Jump to content

Archived

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

birdie

**SOLVED** displaying a match schedule..

Recommended Posts

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 relevant

table name: matches

id|datesched|sched_by|timesched|clan1|clan2|matchtype


i need clan1, clan 2, datesched, timesched to be echo'd.. but have no idea on how to do it ..

=============================
eg.

current time: 20:00

clan1 vs clan2 20/4/2006 21:00
clan3 vs clan4 22/4/2006 18:00

=============================

any help in any way is greatly appreciated! thankz for reading!

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

×

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.