hello, i need help to insert data into 2 table. this is the code i am using to insert into 1 table, how can i insert into 2 table? $query="INSERT INTO `file` VALUES ('', '9', '".$type."', '".$topic."')"; mysql_query($query); echo mysql_error(); $c++; } } echo '<center><b>'. $c.' entries put into database</b></center><br/>'; mysql_close($link); } PHP: thanks
I do actually think you can use INSERT INTO table,table2 (xxxx..... if you have the same rows in the table.
Dear I think no another way except using 2 different query ------------------ Smart Banking & Investment Tips
Run two queries side by side. I mean just run two quries 2nd one immediately after first. Or if you are trying to maintain a mirror database or table you can have a script that is run by cron job lets say every hour to copy the data of one table to another table or may be same table in another database. Here is one such script with whole explanation: http://codingtricks.blogspot.com/2008/02/copy-all-tables-of-one-mysql-db-to.html