corillo181 Posted September 19, 2007 Share Posted September 19, 2007 is there a qway to put a bunch of queries into one? Quote Link to comment https://forums.phpfreaks.com/topic/69850-solved-multiple-queries/ Share on other sites More sharing options...
btherl Posted September 19, 2007 Share Posted September 19, 2007 Can you provide more detail? Do you want to execute several queries in sequence, or do you want to combine data from several queries into one result set? Quote Link to comment https://forums.phpfreaks.com/topic/69850-solved-multiple-queries/#findComment-350892 Share on other sites More sharing options...
corillo181 Posted September 19, 2007 Author Share Posted September 19, 2007 i got a bunch of quieries $q1 = "a query" $q2 = "a query" $q3 = "a query" $q4 = "a query" $q5 = "a query" than i have a few result $r1 = query($q1) $r2 = query($q2) $r3 = query($q3) $r4 = query($q4) $r5 = query($q5) so i was wondering if i could do a one quiery $qall = "$q1;$q2;$q3;$q4;$q5"; $r = query($qall); with out using arrays. Quote Link to comment https://forums.phpfreaks.com/topic/69850-solved-multiple-queries/#findComment-350897 Share on other sites More sharing options...
GingerRobot Posted September 19, 2007 Share Posted September 19, 2007 No. Whilst multiple queries ARE supported by mysql, you cannot make multiple queries in that fashion from PHP. Depending on your queries, it could be possible that you could turn those into fewer queries however. Other than that, you will indeed need to loop through them all. Quote Link to comment https://forums.phpfreaks.com/topic/69850-solved-multiple-queries/#findComment-350904 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.