> as each one I want to delete will be the smallest ID number > (as it grows with each message added to it).
I think you mean the lowest ID in the table and I suppose you're looking for a MySQL query. As of MySQL version 4 (currently in development) you can use "delete from <tablename> where id in (select min( id ) from <tablename>);". I suppose you're not working with the development version of MySQL. For MySQL 3.x you will have to use two queries: - select min(id) from <tablename> - delete from <tablename> where id=<min(id)> Unfortunatly it's not possible to do "delete from <tablename> where id=min(id), because the min-function is a so called "group" function. Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php