Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 702 Bytes

2008-01-12-173.md

File metadata and controls

26 lines (21 loc) · 702 Bytes
date layout slug title tags location geo
2008-01-12 00:58:47 UTC
post
173
MySQL Stored Procedure in PHP gotcha
php
mysql
stored
procedure
mysqli
Carr Street, Toronto, ON, Canada
43.649345
-79.404238

If you're getting a 'Commands out of sync' message after calling a Stored Procedure in MySQL 5+, it means there's some empty resultset in still in the resultset buffer. I'm not sure exactly why this is happening, but here's the workaround:

<?php

  // Assuming $connection is your MySQLI object

  while($connection->next_result()) $connection->store_result();

?>