Question: I am having some issues with the following query, the issue is that I need it so it displays the courses for the current day until the end of the day not just till the start of the day like it does currently. Basically users cannot access the course if they are trying to access the course on its enddate so i need to some how make it so that they can still access it for 23 hrs 59 mnutes and 59 seconds after the end date I think I have to add some sort of time to the NOW() to accomplish this but im not sure how to go about this.The query is as follows:

```
if ($courses = $db->qarray("

SELECT `CourseCode` AS 'code' FROM `WorkshopUserSessions`
LEFT JOIN `WorkshopSession` ON (`WorkshopUserSessions`.`sessionid` = `WorkshopSession`.`id`)
LEFT JOIN `WorkshopCourses` ON (`WorkshopSession`.`cid` = `WorkshopCourses`.`cid`)
WHERE `WorkshopUserSessions`.`userid` = {$info['uid']} AND `WorkshopUserSessions`.`begindate` <= NOW() AND `WorkshopUserSessions`.`enddate` >= NOW()
ORDER BY `WorkshopUserSessions`.`begindate` ASC

")) {

```

Any help would greatly be aprreciated!

Thanks,
Cam

Answer: 
I think you need to modify it like this

```
enddate + INTERVAL 1 DAY >= NOW()

```

Ofcourse this adds 24 hours, for 23:59:59 just change >= to >
Try replacing:

```
AND `WorkshopUserSessions`.`enddate` >= NOW()

```

with

```
AND DATE(`WorkshopUserSessions`.`enddate`) = CURDATE()

```

Hope it helps.