PDA

View Full Version : Retrieve info from last deleted record?


Jakeman
04-11-2004, 08:45 PM
For example, I run this query in my vB integrated script:

$DB_site->query("DELETE FROM tablename WHERE field1=X");

There is only ever 1 matching field for this query because field1 is autoincremented. Now I want to know what the value in a different field, field2, was for the record I just deleted.

Does vB's DB_Sql_vb class record that information? Or is there a way I can capture that information during the query? Or am I going to have to query the field before deleting the record?

Dean C
04-12-2004, 11:37 AM
I don't think you can do this without running an extra query beforehand.