PHP and MySQL Display by date and time -


i looking way display upcoming events date out displaying past events.

mysql table:

id   |   title   |   date   |   time 1        title1    2013-10-5    12:00 2        title2   2013-10-10    12:00 3        title3   2013-10-25    01:00 4        title4   2013-10-31    11:30 

i display so:

title2 2013-10-10 title3 2013-10-24 title4 2013-10-31 

without displaying events have passed.

any appreciated! thank you.

without changing current structure, use curdate() , curtime()

select   id, title, date, time   titles   date >= curdate() , time >= curtime()  

read on mysql date , time functions


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -