Reputation: 3323
I have the following:
/* execute multi query */
if ($mysqli->multi_query($query)) {
$n = 0;
do {
/* store first result set */
if ($result = $mysqli->store_result()) {
$i = 1;
$p = 1;
while ($row = $result->fetch_row()) {
print_r($row);
$n++;
}
}
}
}
/* close connection */
$mysqli->close();
I am having trouble seeing the wood from the trees - I am getting an 'Unexepected '}'' message - any suggestions?
Upvotes: 0
Views: 45
Reputation: 3171
There is a permanent loop in the do {} sentence. What are you trying to do with it?
You should either remove it or place a real condition:
/* execute multi query */
if ($mysqli->multi_query($query))
{
$n = 0;
while(CERTAIN CONDITION)
{
/* store first result set */
if ($result = $mysqli->store_result())
{
$i = 1;
$p = 1;
while ($row = $result->fetch_row())
{
print_r($row);
$n++;
}
}
}
}
/* close connection */
$mysqli->close();
Upvotes: 1