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? Link to comment https://forums.phpfreaks.com/topic/25339-mysql-query/ 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] Link to comment https://forums.phpfreaks.com/topic/25339-mysql-query/#findComment-115596 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.