Mysql query problem

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mrlayance
Forum Commoner
Posts: 31
Joined: Mon Dec 07, 2009 11:53 am

Mysql query problem

Post by mrlayance »

Code: Select all

WHERE `time` BETWEEN 'Jan 1 %' AND 'Jan 8 %' AND ...
Results
Jan 1 00:33:23
Jan 10 08:52:05

How would I avoid the Jan 10 results?

I have tried a few different combinations with %, <=, etc.

Any ideas? :banghead:
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Mysql query problem

Post by Darhazer »

what is the datatype of the field? Hope it's not char/varchar?
Post Reply