Re: WHERE clause...getting closer
| From: | Ray Hunter | Date: | Wed, 05 May 2004 04:03:06 +0000 |
| Subject: | Re: WHERE clause...getting closer | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185393@lists.php.net to get a copy of this message | ||
On Tue, 2004-05-04 at 19:18, msa wrote:
> $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.
>
> got this error:
> Fatal error: Call to undefined function: year()
>
You sure you did not mean $dataPublished?
--
ray