Hi,
I have a problem in that the date I extract from one table to get records from another doesn't work.
the code:
// get each date from table for current week
$result1 = mysql_query("SELECT * FROM calendar WHERE weekx = $weekx",$db);
while ($myrow = mysql_fetch_array($result1)) {
$datex = $myrow['datex'];
$dayx = $myrow['dayx'];
// now get all stats for each date.
$result2 = mysql_query("SELECT * FROM ads_stats WHERE ads_date = $datex",$db);
while ($myrow = mysql_fetch_array($result2)) {
// do stuff
}
}
I have "echoed" the output from the first query and the date looks fine. The fields are defined as DATE types in both tables, the data in both tables is in the format yyyy-mm-dd. I suspect I'm missing something simple.
Thanks for any help.