Hi,
If I deleted records from Mysql table, is there a way to display the deleted records using php. I know that the delete command will not permanently remove the records
Thanks
Rmias
Display deleted records in mysql
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
well i deleted a whole database before by accident and i couldnt retrieve it no matter how i tried, there is no syntax for this task is there?
i know this code can view what you have just deleted but i dont think this is what you mean
i know this code can view what you have just deleted but i dont think this is what you mean
Code: Select all
<?php
mysql_connect('host', 'user', 'pass') or die (mysql_error());
mysql_select_db('mydb') or die (mysql_error());
mysql_query('DELETE FROM mytable WHERE ref < 150');
printf("Number of Items Deleted = %d\n", mysql_affected_rows());
?>
Last edited by malcolmboston on Fri Apr 16, 2004 7:00 am, edited 1 time in total.