Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling multiple stored procedures #7

Open
Krojack opened this issue Feb 26, 2015 · 0 comments
Open

Calling multiple stored procedures #7

Krojack opened this issue Feb 26, 2015 · 0 comments

Comments

@Krojack
Copy link

Krojack commented Feb 26, 2015

When calling multiple stored procedures, you can run into the following error: "Commands out of sync; you can't run this command now". I added the following to my class.db.php and then call it after calling the procedure query.

public function next_result()
{
$this->link->next_result();
}

So now I run this without the error.

$db->get_row( "CALL calcMedian('table_name','col_name')" );
$db->next_result();
$db->get_row( "CALL calcMedian('table_name','col_name')" );
$db->next_result();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant