Hey guys,


In my DB, i've got appointments set, and i need to select all appointments which are an hour or less away.

For example i want to do something to the following (Dont worry, i know this wont work as is)

SELECT * FROM timetable WHERE time has one hour remaining;

Read this article: Changing Times in MySQL

You need to use the BETWEEN clause also.

Something like:

SELECT * FROM timetable WHERE AppointmentTime BETWEEN CurTime() AND CurTime() + ...

The query above is just to give u an idea. I don't remember the actual functions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.