I'm having a lot of trouble figuring out how to do this. It seems like there should be an easier way.
first, I need to get the distinct dates from a table for a pull-down select menu.
$sql="select distinct section_date from bo_section";
$result=mysql_query($sql, $sql_link);
$dates_available=mysql_fetch_array($result);
then, for each of those dates, I need to populate an array with the site and site id that is available on that date.
$site_sql = "Select bo_site.name, bo_section.section_id from bo_section left join bo_site on bo_section.site_id = bo_site.site_id where bo_section.section_date = '$date'";
$site_result=mysql_query($site_sql, $sql_link);
$site_info=mysql_fetch_array($site_result);
the problem is the arrays overwrite each other as they get to the second and third, etc. I need to get to the info to create an array for JavaScript code.
there's gotta be an easier way. If anyone has any hints, I'm all ears (if you understood what I was trying to say).
craig