CodeIgniter Forums
Calendar HELP! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Calendar HELP! (/showthread.php?tid=32890)



Calendar HELP! - El Forum - 08-09-2010

[eluser]heylarson[/eluser]
I have ran into an issue with my events calendar. Every calendar event is pulled from the database by a unique id, but I cannot find a way to incorporate that event id into the URL so I can view the details of that event. I have tried using jQuery ajax to make the cells clickable, but can't seem to access the database to pull the event id. I have the event's date and event title to reference the database against, but that does not seem to work. If anyone has suggestions, I would definitely be all ears! Thanks.


Calendar HELP! - El Forum - 08-10-2010

[eluser]heylarson[/eluser]
Figured it out thanks to another post. Realized that doing my associative array like so gets me the desired results:

Code:
foreach($query->result() as $row)
{
  $events[ltrim(substr($row->start_date, 8, 2), "0")] = '<a >id.'">'.$row->title.'</a>';
}

For whatever reason this forum is omitting pieces of my code, but you get the idea.