RE: [PHP] Problem with a for loop...
| From: | Matt Schroebel | Date: | Thu, 16 Jan 2003 14:17:08 +0000 |
| Subject: | RE: [PHP] Problem with a for loop... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131858@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Davíð Örn Jóhannsson [mailto:david@atom.is]
> Sent: 16. janúar 2003 13:59
> Subject: RE: [PHP] Problem with a for loop...
>
> I only want the last inserted row in the mysql database, and each time
> the script goes trough the loop it adds a new row into the
> database ...
If you only want the most recent row, why read all of the roww in the table? Why not add a
auto_increment column, or a timestamp, sorting on that column with a limit of 0,1?