Calendar Query

i have a simple calendar with a query. I have the problem that it does not display my end date correctly. If I enter in my calnedar 07.09.12 to 09.09.12 it only shows the days 7 and 8 used but not the last day 9. I think it is related to the query below:

$query_start = intval($_GET['start']);
$query_stop =  intval($_GET['stop']);
$query_iduser =  intval($_GET['uid']);
mysql_select_db($database_inburn, $inburn);
$query_events = sprintf('SELECT `name2` AS title, `start`, `stop` , `description`, `approved2` AS type, `event_id`, `userID5` FROM `_urlaub` WHERE UNIX_TIMESTAMP(`start`) <= %1$d AND (UNIX_TIMESTAMP(`stop`) >= %2$d OR (ISNULL(`stop`) AND UNIX_TIMESTAMP(`start`) >= %2$d))',$query_stop, $query_start, $query_iduser);
$events_set = mysql_query($query_events, $inburn) or die(mysql_error());  
$result_array = array();
while ($row = mysql_fetch_assoc($events_set))

thanks
michael789Asked:
Who is Participating?
 
lwadwellCommented:
Does your `stop` value have a time component?  If it does, it would probably be past your input stop value as it is a date and would end a midnight AM ... before the `stop` datetime.  You may want to try
   AND (UNIX_TIMESTAMP(DATE(`stop`))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.