$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
How to join two queries?
Moderator: General Moderators
-
adilmarwat2004
- Forum Commoner
- Posts: 44
- Joined: Fri Sep 04, 2009 11:28 pm
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: How to join two queries?
I dont think you can combine 2 different actions (SELECT and UPDATE) into one query.
Why would you want to join the queries?
Why would you want to join the queries?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: How to join two queries?
You won't want to do that. Just leave them as two separate queries.
However, is there as particular reason you want to have them become one?
However, is there as particular reason you want to have them become one?