mysql_fetch_array question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eektech909
Forum Commoner
Posts: 34
Joined: Fri Jun 09, 2006 3:59 pm

mysql_fetch_array question

Post by eektech909 »

i'm displaying date from a mysql table by date in php
i'm going to have it compare dates so it won't display anything that has a date earlier than the current date (so it expires)
i run a mysql_query and then fetch the data and then display it in a table on the site.

so how do i have it skip (not display) a row that is "expired" and just continue on to the next entry?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Code: Select all

select * from table where column>'$expire_date'
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'm with Weirdan on this. Write the proper query to exclude the information you don't want beforehand.
Post Reply