I have 2 tables. One of them has 2 more fields than the other. What I want to do is move the entire contents of the smaller table into the bigger table. Then I want to fill in the other 2 fields after the data is moved. What I'm doing isn't working:
mysql_query("INSERT INTO table2 SELECT * FROM table1 WHERE id='$number'");
mysql_query("INSERT INTO table2 (variable1,variable2) VALUES ('$variable1','$variable2') WHERE id='$number'");
None of the rows get filled in at all. But when I delete the 2 extra fields from table2 and do this, it works:
mysql_query("INSERT INTO table2 SELECT * FROM table1 WHERE id='$number'");
So I don't see why a combination of my two queries are causing a problem. What am I doing wrong?