Hello,
I have a database of 46,000 customers. Each customer has a birth date on file "dob". I would like to know who's dob it is today. Just a simple list. If I remove the "WHERE" portion of the following, I get all 46,000 names of course. If I leave it in, I get this:
Warning: Supplied argument is not a valid MySQL result resource
$result=mysql_query ("SELECT * FROM customer order by first_name ASC WHERE dob=$today");
if ($rr = mysql_fetch_array($result))
{ do {
printf("<b>%s, %s </b><br>\n", $rr[2], $rr[1]);
} while ($rr = mysql_fetch_array($result));
}
could somebody please help me?