Jump to content

[SOLVED] Insert Rows from One table to another using new autoid


barkster

Recommended Posts

how do insert a row from one table into another while using the new autoid provided by the new table.  Because I'm not passing the autoid from the old table to the new it says column count incorrect.  Do I have to look up the new autoid first or is there a way around this, InvoiceID is my autoid field

 

"INSERT INTO Invoices SELECT CustomerID,SalesTax,OrderDate,Timestamp,TransactStatus, ErrLoc, ErrMsg, Paid, Deleted, InvoiceTotal, Notes, Quote, Mileage, billdate, recur, recurdays FROM Recurring WHERE InvoiceID='".$id."'";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.