![](https://img.php.cn/upload/image/000/000/000/4cb7b09a9194e48e9b977af9beb93740-0.png)
这是存储过程getpath
![](https://img.php.cn/upload/image/000/000/000/0a55d8013a0e9c930fb6c84f61d89e94-1.png)
这是存储过程reqstudent
![](https://img.php.cn/upload/image/000/000/000/0a55d8013a0e9c930fb6c84f61d89e94-2.png)
这样子调用就会在第二个查询出错(单独每个都是可以的), 错误信息:Commands out of sync; you can't run this command now 别人说要两个之间用mysql_free_result(),但是我用的ezsql, 不知道mysql_free_result()该传入哪个参数?
但是如果我不用存储过程的话改为普通sql语句查询就能正确执行,不会出错了。不知道问题出在哪?是mysql_free_result()还是其他有问题?![](https://img.php.cn/upload/image/000/000/000/0a55d8013a0e9c930fb6c84f61d89e94-3.png)
应该是在
if
语句中释放$result