i have a script which takes data from a database and displays it on a page.
It sorts the rows by an id number, and displays them in that order
heres the script
// get the info from the db
$sql = "SELECT showtime, html FROM showfeed ORDER BY showtime ASC LIMIT $offset, $rowsperpage";
$result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);
// while there are rows to be fetched...
while ($list = mysql_fetch_assoc($result))
{
// echo data
echo $list['html'] . "<hr />";
} // end while
what I want to do is filter that data so that if the ID number of a row is less than a given number than it won’t be displayed. And if it is greater than a certain number it will be displayed normally.
Assuming ID is a field in your table:
However, if this would work for you, then probably better to change your query to