adilmarwat Posted March 7, 2010 Share Posted March 7, 2010 $query = "SELECT * FROM info";$query2 = "UPDATE info SET qty = round(`marks`/550*100, 2)";How i join these two queries within one query in php page. please help. Adil Link to comment Share on other sites More sharing options...
boen_robot Posted March 7, 2010 Share Posted March 7, 2010 You can't. Those are two separate queries that you need to execute. Simply call mysql_query() twice. First with one query, then with the other one. Alternatively, use mysqli::multy_query(). Link to comment Share on other sites More sharing options...
skaterdav85 Posted March 8, 2010 Share Posted March 8, 2010 you could do this through transaction processing. If you do this, I think you need to change your db engine to InnoDB. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.