I am attempting to create a calendar that is displayed as follows:
[table]
[tr]
[td]Date[/td]
[td]Consultant1[/td]
[td]Consultant2[/td]
[td]Consultant3[/td]
[/tr]
[tr]
[td]6/25/13[/td]
[td]client1 | event_type1[/td]
[td]client2 | event_type1[/td]
[td]client1 | event_type2[/td]
[/tr]
[tr]
[td]6/26/13[/td]
[td]client1 | event_type2[/td]
[td]client2 | event_type3[/td]
[td]client1 | event_type1[/td]
[/tr]
[/table]
…etc
In my database, I have the following tables>>columns
[ul][li]billing_status>>billing_id, billing_type, billing_color[/li]
[li]calendar_event>>calendar_event_id, consultant_id, client_id, event_id, billing_id, date[/li]
[li]client>>client_id, client_name[/li]
[li]consultant>>consultant_id, f_name, l_name[/li]
[li]dates>>date (Note: Each date is used only once and they are used as the table’s key, but not all dates are used. This table serves as an ‘inventory’ of available dates.[/li]
[li]event_type>>event_id, event_type, event_full_name[/li][/ul]
I am attempting to generate an array that combines all of the different dimensions using the following:
[php]
Date | "; while ($consultantresult=mysql_fetch_array($consultantresults)) { $name = $consultantresult[f_name] . " " . $consultantresult[l_name]; $consultant = array($name); foreach ($consultant as $consultants) { echo "" . $consultants . " | "; } echo "
---|---|
" . $date . " | " . $client . " | " . $type . " | "; } echo "
However all this produces for me is a blank page. Even when I “view source” of the page, it doesn’t even have the tags.
Is there another way to do this? My database is only populated with “sample” data right now, so even if I had to restructure the database, I wouldn’t be opposed to it.