Jump to content

help?


dadamssg

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.