Excuse my ignorance but I'm having a tough time figuring this out.
I'm trying to take the result from one mysql command, and use it in another command.
Here's my code, it doesnt work.
//select the event end date of event ID
$sql = "SELECT enddate FROM mm_eventlist_dates WHERE id = $id";
$result = mysql_query($sql);
//plug in the event end date, find event that starts the next day
$sql = "SELECT id FROM mm_eventlist_dates WHERE startdate = date_add($result, INTERVAL 1 DAY)";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
echo "Next Event ID" . $row['id'];
I'm so lost.
Please help!
Thanks, Nick