$query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(datePublished) = ' .
YEAR('NOW'()) . ' AND MONTH(datePublished) = ' . MONTH('NOW'()) . ' ORDER BY
sortBy DESC';


this is supposed to return only the records that have the current month and
year in the datePublished record.

the above code got a parse error

this code:

$query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(datePublished) = ' .
YEAR(NOW()) . ' AND MONTH(datePublished) = ' . MONTH(NOW()) . ' ORDER BY
sortBy DESC';

got this error:
 Fatal error: Call to undefined function: year()

any ideas, anyone?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to