Forum Moderators: coopster

Message Too Old, No Replies

SQL Insert and Delete?

Is there a way to grab and remove

         

briesm

2:49 pm on Jun 28, 2005 (gmt 0)

10+ Year Member



Anyone know if there's a way to call a query but remove whatever you grabbed from the database, or would I have to do a query to retrieve what i needed, then follow it up with a delete on the same query results?

Sarah Atkinson

4:46 pm on Jun 28, 2005 (gmt 0)

10+ Year Member



Do you mean something like: ?
$sql="DELETE FROM yourtable WHERE id='$id'";

jatar_k

5:34 pm on Jun 28, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> do a query to retrieve what i needed, then follow it up with a delete on the same query results

yes, that would be the way to do it