![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveRe: PHP script SELECT FROM mysql database WHERE date
From: Samuel <lets.monroe@gmail.com>
Date: Fri Sep 30 2005 - 08:52:05 CEST
In your first example you'd have to sort the data with php, and in the
SELECT * FROM pictures ORDER BY date
You will be able to get all the data you need in only one query. The
<?php
while (($number_of_items < 30) && ($row = mysql_fetch_array($result)))
print_the_data_or_whatever($row);
$last_date = $row['date'];
?>
Hope I helped and all =)
|