Ver Mensaje Individual
  #3 (permalink)  
Antiguo 31/10/2008, 13:19
mefeza
 
Fecha de Ingreso: octubre-2008
Mensajes: 11
Antigüedad: 15 años, 6 meses
Puntos: 0
Respuesta: Comparar fechas

Código PHP:
$fecha_actual date('d/m/Y');
$fecha_actual strtotime($fecha_actual,0); 
Y la consuta es asi:
Código PHP:
$query_anuncios sprintf("SELECT * FROM xxx WHERE sub = %s and (publicar <= %s or publicar = '0') ORDER BY id DESC"GetSQLValueString($colname_anuncios"text"), GetSQLValueString($fecha_actual"text"
Pero no me convierte $fecha_actual, esto es lo que consulta:

SELECT * FROM xxx WHERE subcateg = '2' and (publicar <= NULL or publicar = '0') ORDER BY id DESC

Asi convierto el valor cuando lo voy a guardar en la bd:

Código PHP:
strtotime($_POST['ffin']) 
Espero me puedan ayudar.