Jump to content

Recommended Posts

what exactly does the curdate() function output? maybe i just play around with the right format ill get somewhere because my table has a created, start, and end fields...so im tryin to select the ones that going on tomorrow according to the start and end fields..if that makes sense...

Link to comment
https://forums.phpfreaks.com/topic/143301-help/#findComment-751584
Share on other sites

worked perfect thank you...and im gonna create a selection list for the user to select a date and then pull up everything thats goin on on that date...what date format does sql understand? cause i tried (2009-02-02) and (2009-02-02 00:00:00) and although both of those didn't get an error, they didn't select anything...

Link to comment
https://forums.phpfreaks.com/topic/143301-help/#findComment-751606
Share on other sites

haha i don't know if im talkin to myself but i modified chicken littles request to below and it works, but i still want to know the format CURDATE() is so i can use that for my date selection list.

 

SELECT * FROM test WHERE DATE(start) <= DATE_ADD( CURDATE(), INTERVAL+1 DAY) AND DATE(end) >= DATE_ADD( CURDATE(), INTERVAL +1 DAY) ORDER BY start DESC	

Link to comment
https://forums.phpfreaks.com/topic/143301-help/#findComment-751612
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.