parse error, date comparison

admin

Administrator
Staff member
I get a parse error with the following code but I can't figure out why:

function resume_tests($nombre){
global $db_lien;

$requete = "SELECT id, libelle, site_h, date FROM articles WHERE date > 'date("Y-m-d", (time()-1209600))' ORDER BY date LIMIT $nombre";
$resultat= mysql_query($requete, $db_lien);

...
}

The parse error is ont line that begins with $requete = "SELECT....

Is it because I have field named date in my table, or is it something else?
Other question : Is there a smarter way to compare dates?

Thanks,
Milou
 
Back
Top