How to select entries up to a certain date
Hi,
I am setting up a site that is going to display gigs of bands- how to I get Mysql/php to select only the gigs that havn't happened yet (ie those with a date with greater value then the current date,
Cheers
demonhale posted this at 16:59 — 10th August 2005.
He has: 3,278 posts
Joined: May 2005
Since Im not really proficient with PHP/mysql...
You could do the same function with javascript
timjpriebe posted this at 17:13 — 10th August 2005.
He has: 2,667 posts
Joined: Dec 2004
You can actually just use something like the following:
SELECT * FROM tablename WHERE datecolumn > TODAY();
I believe that will work.
onoff posted this at 17:17 — 10th August 2005.
They have: 11 posts
Joined: Jul 2005
Just tried that but it just read an error message (something to do with () at the end)- any suggestions?
timjpriebe posted this at 17:22 — 10th August 2005.
He has: 2,667 posts
Joined: Dec 2004
Sorry, that should be NOW()
onoff posted this at 17:51 — 10th August 2005.
They have: 11 posts
Joined: Jul 2005
Excellent- all working now- thanks a mil!
timjpriebe posted this at 18:20 — 12th August 2005.
He has: 2,667 posts
Joined: Dec 2004
Glad to be of service.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.