csabi_fl Posted October 27, 2006 Share Posted October 27, 2006 Hi.Here is my question.After running an SQL query on one of my tables in my database ,am I able to save the result of this query in another table?If so,how? Quote Link to comment Share on other sites More sharing options...
gmwebs Posted October 27, 2006 Share Posted October 27, 2006 [code]<?php$sql = "INSERT INTO table1 (id, item, quantity) SELECT id, item, quantity FROM table2 WHERE description='apples'";$result = mysql_query($sql, $dbconnection);?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.