Page 1 of 1
Display deleted records in mysql
Posted: Fri Apr 16, 2004 6:24 am
by Rmias
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
Posted: Fri Apr 16, 2004 6:28 am
by markl999
I know that the delete command will not permanently remove the records
I'd be interested to find out how you know this, i was under the impression that a deleted row is premanently deleted from the table. Please correct me if i'm wrong

Posted: Fri Apr 16, 2004 7:00 am
by malcolmboston
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
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());
?>
Posted: Fri Apr 16, 2004 7:00 am
by JayBird
Quote from manual "Once you delete data from a table, it's gone for good!"
Mark