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."'";

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.