searls03 Posted May 4, 2014 Share Posted May 4, 2014 hi I have a code that puts events into a calendar. I am doing a new calendar for a new client and have some different issue that are arising. the original code I have is meant for a "one day" event. I am now trying to place in a "multi-day" event. how can I change this query to a multi-day selector. $result = mysql_query("SELECT * FROM events where start='".$m1."/".sprintf ("%02u", $d)."/".$year."'"); I need to keep everything after "start =" the same. However, start is nolonger in my database, it is start and end. How can I generate a query that selects it for multiple dates where it is between start and end. does this make sense? thanks Link to comment https://forums.phpfreaks.com/topic/288226-help-selecting-from-a-range-of-dates/ Share on other sites More sharing options...
searls03 Posted May 4, 2014 Author Share Posted May 4, 2014 sorry, I was thinking in the current query it says date, not start. start IS in the query....like it says right after that. sorry Link to comment https://forums.phpfreaks.com/topic/288226-help-selecting-from-a-range-of-dates/#findComment-1478133 Share on other sites More sharing options...
Barand Posted May 4, 2014 Share Posted May 4, 2014 If you are not storing dates in yyyy-mm-dd format then you can't. Dates in other formats do not compare correctly. Link to comment https://forums.phpfreaks.com/topic/288226-help-selecting-from-a-range-of-dates/#findComment-1478141 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.