Ayudh

I would have thought that in the second one both would have matched?

Where 5:05 between 5:00 And 5:59
OR 5:30 between 5:00 And 5:59

??

Am i misunderstanding this function? How would i structure the query
so that i could match on all three times?

TIA.
Ricardo.


Ricardo,
Your query is returning the right results in all of your 3 cases as far as I can see.
Case 1 matches because the 1st clause is satisfied.
Case 2 does not match because neither clause is satisfied.
Case 3 matches because the 2nd clause is satisfied.


Regards: Ayudh

+----------------------------------------------------------------+
| SOAP is the glue! Hook up your server directly to your bank.   |
| Connect to VeriPay xServ, the Australian Payments Web Service. |
| Reliable, Secure, FAST: http://www.xilo.com/xserv              |
+----------------------------------------------------------------+


Hi guys,
Can anyone tell me where i went wrong?
I can't seem to match the time if they are both within the same hour.
unless the time is on the O'clock.

SELECT * FROM diary
WHERE (({ts '2004-06-28 17:00:00'} BETWEEN date AND finishTime)
OR ({ts '2004-06-28 17:59:00'} BETWEEN date AND finishTime ))
AND cid = 72

date / finishTime
28/06/2004 5:00:00 PM    28/06/2004 5:30:00 PM - match
28/06/2004 5:05:00 PM    28/06/2004 5:30:00 PM - no match
28/06/2004 5:05:00 PM    28/06/2004 6:30:00 PM - match

I'm using MySQL 4.1.1
TIA
Ricardo.








--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to