Ver Mensaje Individual
  #8 (permalink)  
Antiguo 08/02/2006, 12:14
Avatar de chalchis
chalchis
 
Fecha de Ingreso: julio-2003
Mensajes: 1.773
Antigüedad: 20 años, 9 meses
Puntos: 21
me sale esto

si pongo el mysql_error

$sqlfecha="SELECT DATEDIFF('2006-02-07 23:59:59','2006-02-08') AS resultado";
$resultado = mysql_query($sqlfecha, $conexion)or die (mysql_error()); ;
$diferencia=mysql_result($resultado,0,"diferencia" );
echo $diferencia;

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('2006-02-07 23:59:59','2006-02-08') AS resultado' at line 1
__________________
gerardo