Posted By

eme_dlr on 05/13/10


Tagged

php date datediff


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

dantreacy
eval


Select items within time range


 / Published in: PHP
 

  1. $buscar_fecha = "SELECT * FROM items WHERE DATEDIFF('$hoy', fecha) > '$fecha_buscada'";
  2. $encontrados = array();
  3. while ($items = mysql_fetch_array($buscar)){
  4. echo('<br />Fecha: '.$items['fecha']);
  5. }

Report this snippet  

You need to login to post a comment.