DATE problem

I'm trying to count rows that were added today. The column that I am
counting on is in DATETIME format, so there are hours and minutes and
seconds recorded, but I only need to check the date....

$sql =3D "SELECT
COUNT(table.id)
FROM table
WHERE table.created =3D NOW()";

$num =3D mysql_result(mysql_query($sql),0);

The problem with this is that unless the record was added at precisely =

the same time as NOW()=97which never happens=97no rows are returned. Is =

there a way I can round off table.created to just a DATE, then compare =

it to CURDATE()?? I've been reading DATE Format functions, but am not =

sure how to proceed.

Thanks in advance.

....Ren=E9

---
Ren=E9 Fournier
www.renefournier.com=


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql [at] m.gmane.org
m5 [ Di, 01 Februar 2005 21:38 ] [ ID #620365 ]
Datenbanken » gmane.comp.db.mysql.general » DATE problem

Vorheriges Thema: Mysqldump unusable, bugged?
Nächstes Thema: How much is cached