Jump to content

**SOLVED** displaying a match schedule..


birdie

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!
Link to comment
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]
Link to comment
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.