depojones Posted June 2, 2010 Share Posted June 2, 2010 Hello, How do I automatically delete 500 record from mysql using php and keep the last 100 records. which means the delete will only take effect after 600 records. Then 500 will be deleted and the last 100 will be left. Thanks Link to comment https://forums.phpfreaks.com/topic/203639-delete-from-mysql-using-php/ Share on other sites More sharing options...
depojones Posted June 2, 2010 Author Share Posted June 2, 2010 any hint? Link to comment https://forums.phpfreaks.com/topic/203639-delete-from-mysql-using-php/#findComment-1066679 Share on other sites More sharing options...
kenrbnsn Posted June 2, 2010 Share Posted June 2, 2010 Wait a little longer than 15 minutes for people to respond. Ken Link to comment https://forums.phpfreaks.com/topic/203639-delete-from-mysql-using-php/#findComment-1066680 Share on other sites More sharing options...
depojones Posted June 2, 2010 Author Share Posted June 2, 2010 Thats very harsh. But why? anyway, this is what i have so far: $sql=mysql_query("DELETE FROM table ORDER BY id DESC LIMIT 100") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/203639-delete-from-mysql-using-php/#findComment-1066684 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.