Tuesday, 1 April 2014

how to govern churned statements in loop

Hallo we have several queries to execute:select * from table;call
procedureA(par1);call procedureB(par2);I would like to govern them within
a loop to perform other operations:$queries = array("select * from
table;", "call procedureA(par1);", "call
procedureB(par2);");foreach($queries as $query) {
$res=$db->query($query); // do something here with a query outcome
$r->close();}The initial matter runs fine; during a second iteration, it
stops observant that $r is a non object:Call to a member duty close() on a
non-objectApart from controlling mysqli_multi_query(), in that proceed
could we loop govern churned queries?

No comments:

Post a Comment