Jump to content

[SOLVED] multiple queries


corillo181

Recommended Posts

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.