Delete records within a specific Range from MySQL table
Filed under Labs
If you want to delete a range of records from MySQL table then you can use following query. Below example will delete records within the ID 1000 and 5000.
<?php
delete from table_name where ID between 1000 and 5000
?> |
or you can use below query for the same.
<?php
delete from table_name where id >= 1000 and id <= 5000
?> |
Posts you may like:
php pagination code example using MySql database
Here is a working code for pagination using PHP and MySql database. Its is tested …
How to include php headers on html site
PHP is a powerful language for web development, it have many in built functions. Here …
Meta refresh tag HTTP-EQUIV “REFRESH”
The refreshing time of a webpage can be define by using html tag HTTP-EQUIV “REFRESH”. …
Open link in a new window
Here is some ways to make html links for a webpage, it will be useful …
HTML5 page structure
HTML5 offers more powerful structure comparing to older versions of Html. There are many new …