Hello msa,
Wednesday, May 5, 2004, 2:18:57 AM, you wrote:
m> $query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(datePublished) = ' .
m> YEAR('NOW'()) . ' AND MONTH(datePublished) = ' . MONTH('NOW'()) . ' ORDER BY
m> sortBy DESC';
m> the above code got a parse error
m> any ideas, anyone?
Your quotes are wrong and you shouldn't use NOW like that:
$query_rsENews = "SELECT * FROM NewsArchive WHERE YEAR(datePublished)
= YEAR(NOW()) AND MONTH(datePublished) = MONTH(NOW()) ORDER BY sortBy
DESC";
Should be a lot closer to what you want.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php