birdie Posted April 7, 2006 Share Posted April 7, 2006 hi, as you may have noticed i'm planning on making a match schedule. I just have one problem, i need to create a script which displays all of the matches ,which have not already started or finished, in order..the table so far would be like this but it is flexible depending on if columns are relevanttable name: matchesid|datesched|sched_by|timesched|clan1|clan2|matchtypei need clan1, clan 2, datesched, timesched to be echo'd.. but have no idea on how to do it ..=============================eg.current time: 20:00clan1 vs clan2 20/4/2006 21:00clan3 vs clan4 22/4/2006 18:00=============================any help in any way is greatly appreciated! thankz for reading! Quote Link to comment Share on other sites More sharing options...
Barand Posted April 7, 2006 Share Posted April 7, 2006 It would be simpler to combine date and time cols into a single DATETIME type column then you could[code]SELECT * FROM tablename WHERE datetimesched> NOW()[/code]As it is, you need[code]SELECT * FROM tablename WHERE (datesched = CURDATE() AND timesched > CURTIME() ) OR (datesched > CURDATE() )[/code] Quote Link to comment Share on other sites More sharing options...
birdie Posted April 7, 2006 Author Share Posted April 7, 2006 thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.