You probably want to wrap this in a transaction...

$query = "insert into foo select * from bar";
#Execute that.
$query = "delete from foo";
#Execute that.

Add lots of error-checking and a "begin" and "end" (or "rollback" for an
error)

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Brandon Orther <[EMAIL PROTECTED]>
Newsgroups: php.general
To: PHP User Group <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 4:33 PM
Subject: Using PHP to move a row of information to another table


> Hello,
>
> In MSSQL:
>
> I want to take one row of information from one table and put it into
> another row.  Does anyone know of an easy way?  Or do I have to go
> column by column copying each column into the new table?
>
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to