Ok, so I have figured alot of stuff out from here and I hope I can get some more help.

This problem seems to be a common one from different types of databases to mysql but how about between tables inside a mysql database.

I have a table called temp
`id` int(11) NOT NULL auto_increment,
`partnum` varchar(100) default NULL,
`description` varchar(200) default NULL,
`price` varchar(14) default NULL,
`quantity` int(11) default NULL,
`date` date default NULL,

another table called custhistory
`id` int(11) NOT NULL auto_increment,
`custid` int(11) default NULL,
`partnum` varchar(100) default NULL,
`description` varchar(200) default NULL,
`price` varchar(14) default NULL,
`quantity` int(11) default NULL,
`date` date default NULL,

when I fill data into the temp table I don't fill the custid or date field. That field is filled when checkout is complete for the customer that orders the parts.
So here is what I want to do.
Copy the temp table to the custhistory table and then enter the custid and date. Here is the code I am using and it inputs a seperate entry with the two fields, can we please combine the statement to work right.

PHP Code:
<?

// connect to server, database, table.
include ("../../dbconnect.inc");
$date date('Y-m-d');

// add the new information into the database
$string $_POST['customer'];
list(
$linkid,$name) = explode("|"$string);

$query "INSERT INTO custhistory(partnum, description, price, quantity) SELECT partnum, description,price,quantity FROM temp";
mysql_query($query) or die(mysql_error());
$queryfin "INSERT INTO custhistory(custid,date) VALUES ('$linkid','$date')";
mysql_query($queryfin) or die(mysql_error());
?>
Thanks guys,