This topic is locked

SQL Query to know if any event exist on given date

9/1/2009 4:45:23 AM
Calendar Template general questions
B
bioenable author

I need a SQL Query in which i can pass Date, to know if any event exist on that given date in calcalendar table(it shud chk for Reccurring and non recurring event for that date).
i have added userIDs in this table, and want to know , which user is scheduled for which date.

B
bioenable author 9/1/2009

I have recently purchased Calendar template.

its working perfectly.
I have added few custom fields in it, and thats getting stored and displayed perfectly on the Calendar (monthly / daily / weekly).
the calendar module is part of my software, which needs to also know the events defined in the calendar.
Wat i believe should be possible is to fire a query in "calcalendar" table and see the events defined for a particular date , I need this SQL Query in which i pass Date as parameter and it returns events of that date defined in calcalendar table.
Please help me to get the reqd data.

Sergey Kornilov admin 9/1/2009

Here is what you can do.

  1. Enable debugging setting $dDebug variable to true in include/dbcommon.php file
  2. Proceed to caldaily table to see SQL query that pulls data for one day.
  3. For more info check 'List page: Before SQL query' event of caldaily table.