Between

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
kpraman
Forum Contributor
Posts: 172
Joined: Fri Oct 13, 2006 10:54 am

Between

Post by kpraman »

I have 2 fields

1. start_date
2 end_date

how can i get inbetween dates?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

kpraman
Forum Contributor
Posts: 172
Joined: Fri Oct 13, 2006 10:54 am

Post by kpraman »

I have a page where the start_date - end_date (dates will have hyperlinks), in the query how can i use if the user selects in between dates.

Code: Select all

SELECT * FROM table WHEN userdate Between start_date AND end_date
I am not getting the results
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

WHEN should be WHERE.
Post Reply