Ok heres what I am trying to do. I have a table that has certain things that are done every certain number of days. When the thing is done, it updates the next time it is supposed to be done again. That part works fine. What I'm stumped on is I want to now retrieve data based on if it is supposed to be done today, tommorrow, or next week. Here is what I tried:
<?php
include 'connection.php';
$result_a = mysql_query("SELECT * FROM tracking",$db);
$myrow = mysql_fetch_array($result_a);
$result_b = mysql_query("SELECT * FROM tracking WHERE date('mdy') = date('mdy', $myrow['next'])",$db);
if ($myrow = mysql_fetch_array($result_b));
echo $myrow['field1'];
echo $myrow['field2'];
}
?>
What am I doing wrong here? Or is there an easier way?