<?php
$lista = array(2010,2009,1999,2010,2010,2008,2010);
$lista = array_unique($lista);
$lista = array_values($lista);
?>
.
<?php
$lista = array(2010,2009,1999,2010,2010,2008,2010);
$lista = array_unique($lista);
$lista = array_values($lista);
?>
.
DELETE n1FROM prueba n1, prueba n2WHERE n1.titulo = n2.tituloAND n1.id > n2.id; |
DELETE n1FROM prueba n1, prueba n2WHERE n1.titulo = n2.tituloAND n1.id < n2.id; |
BINARY[(N)]CHAR[(N)]DATEDATETIMEDECIMAL[(M[,D])]SIGNED [INTEGER]TIMEUNSIGNED [INTEGER]SELECT max(CAST(velocidad AS UNSIGNED)) FROM coches
// para decimal
SELECT max(CAST(velocidad AS DECIMAL(2,2))) FROM coches
si la maxima velocidad fuera 145.322456 saldria 45.32
SELECT max(CAST(velocidad AS DECIMAL(3,2))) FROM coches
si la maxima velocidad fuera 145.322456 saldria 145.32
$cfg['Servers'][$i]['host'] = 'localhost';$cfg['Servers'][$i]['host'] = '127.0.0.1';4) reiniciar el apachey listo !! ;)---------------------------------------sacado de aquí---------------------------------------$cfg['Servers'][$i]['host'] = 'localhost';$cfg['Servers'][$i]['host'] = '127.0.0.1';http://127.0.0.1/PhpMyAdminNetwork Connections-> Properties and on local area connection->uncheck IPV6.\%windir%\system32\drivers\etc\ with a text editor and comment out this line:::1 localhost#::1 localhost<?
if (!(isset($_GET['tipoDeOferta'])))
{
$_GET['tipoDeOferta']="articulos";
}
if (($_GET['tipoDeOferta']!="articulos") && ($_GET['tipoDeOferta']!="servicios"))
{
$_GET['tipoDeOferta']="articulos";
}
if ($_GET['tipoDeOferta']=="articulos")
{
$aux1=" checked";
$aux2="";
}
else
{
$aux1="";
$aux2=" checked";
}
?>
<div class="tipoDeOferta">
Artículos <input type="radio" name="tipoDeOferta" <?echo $aux1;?>>
Servicios <input type="radio" name="tipoDeOferta" <?echo $aux2;?>>
</div>
.
function redondearEuroAlAlzaAlAlza($number)
{
$resultado = explode(".", $number);
$aux1=$resultado[0];
$aux2=$resultado[1];
$aux="";
if (sizeof($resultado)==2)
{
if (strlen($aux2)>=3)
{
if ($aux2[2]>=5)
{
$aux2[2]=9;
$number=$aux1.".".$aux2;
$number+=0.001;
$resultado = explode(".", $number);
$aux1=$resultado[0];
$aux2=$resultado[1];
}
}
//***********************
if (strlen($aux2)>=3)
{
$aux2=$aux2[0].$aux2[1];
}
if (strlen($aux2)==1)
{
$aux2=$aux2[0]."0";
}
if (strlen($aux2)==0)
{
$aux2="00";
}
}
else
{
$aux2="00";
}
return $aux1.".".$aux2;
}
<?
// Evitamos la inyeccion SQL
// Modificamos las variables pasadas por URL
foreach( $_GET as $variable => $valor ){
$_GET [ $variable ] = str_replace ( "'" , "'" , $_GET [ $variable ]);
}
// Modificamos las variables de formularios
foreach( $_POST as $variable => $valor ){
$_POST [ $variable ] = str_replace ( "'" , "'" , $_POST [ $variable ]);
}
?>
<?
if(!isset( $_GET [ "inyeccion" ])){
header ( "location: ?inyeccion='" );
} else {
echo 'Tu servidor ' ;
if( $_GET [ "inyeccion" ] != "'" )echo 'no ' ;
echo 'tiene problemas de inyección' ;
}
?>
<script language="JavaScript1.2">
<!--
document.writeln("<b>Tú resolución es de:</b> " + screen.width + " x " + screen.height +"");
//-->
</script>
<html>
<head>
<script type="text/javascript">
function raton(e) {
x = e.clientX;
y = e.clientY;
document.getElementById('co').innerHTML = x+'-'+y;
}
</script>
</head>
<body onmousemove="raton(event)">
<p id="co"></p>
</body>
</html>