pedroz
1
table_1
id, date, username
786, 2010-11-15 17:26:00, 22905035
787, 2010-11-29 18:26:01, 102380017
787, 2010-11-29 18:26:08, 102380017
$count = mysql_num_rows(mysql_query(“SELECT id
FROM table_1
WHERE DATE_FORMAT(date
,‘%d%m%Y’) = '”.date(‘dmY’).“'”));
considering today is 29-Nov-2010…
echo $count // …2
should be 2 but it is not working…
anyone knows why?
thanks!
r937
2
please echo your query string so that we can see exactly what mysql sees
in other words, resolve your php substitution and show us the actual sql generated
r937
4
no, please echo the sql statement, starting with SELECT and ending with whatever that php function produces
also, what is the datatype of the date
column?