Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 07-16-2005, 03:24 AM Mysql Search Help
Junior Talker

Posts: 1
Trades: 0
How to search between dates with php mysql db questy results.

i need to get result for between particular dates or single day.

esp: get result from 01-02-2005 to 30-02-2005 or any dated between.

Please help me,

thanks.
iconsis online.
iconsis is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-16-2005, 06:14 AM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
MySQL provides a neat function called BETWEEN and it is for this very purpose, however the format you are using above will not work with this solution. You will need to change your dates to one of the supported formats like so.

Code:
SELECT * FROM mytable WHERE date BETWEEN '2004-01-01 00:00:00' AND '2004-01-31 23:59:59';
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Mysql Search Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35870 seconds with 12 queries