If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Searching for a specific 'date = tomorrow' query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-17-06, 06:08
TheWock TheWock is offline
Registered User
 
Join Date: Nov 2005
Posts: 5
Searching for a specific 'date = tomorrow' query

Hi,

I've read chapter 12.5 of the MySQL manual but I can't find (or perhaps overread) the answer to the following question.

When you want to select all the rows containing the current date you can do the following: SELECT * from blabla where date = curdate()

What I want is that you select all the rows containing the date from tomorrow. a logical solution would be: SELECT * from blabla where date = curdate()+1

The problem arises when you perform the query at the last day of the month. If I use that query on (for example) 31 January then he will filter all the rows containing date = 32 january.

Is there a beter solution to my problem?
Reply With Quote
  #2 (permalink)  
Old 01-17-06, 06:40
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,258
DateAdd() may be more appropriate
HTH
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On