Ray Hunter wrote:
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
Curt, thanks, your code works perfectly. Can I ask you two questions?
1. I am not sure what you mean by adding an index. I looked in the mySQL
help files and from what I can figure, I have already done that...
2. Now that the code actually works, we have come up with an issue. When
the
$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
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
* Thus wrote msa ([EMAIL PROTECTED]):
$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?
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
6 matches
Mail list logo