Hi, I am using CakePHP 1.2.3.8166, PHP 5.2.8, MySQL 5.0.67.
I am having difficulty getting stored procedures to work with CakePHP. I got an error message to begin with (I can't remember it - it's irrelevant now), but after some searching, I discovered that I had to use the MySQLi database driver, so I enabled that. I thought it was working because then I could run a stored procedure, but then after running a second stored procedure I started to get "Commands out of sync; you can't run this command now" from mysql. This page: http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html told me that I was probably running commands in the wrong order and the comments on http://www.php.net/mysqli_multi_query showed me that was probably the case, or results weren't being freed properly. I started to investigate the core code and I discovered a couple of bugs which meant that indeed resources were not being freed correctly and I also discovered that multiple resultsets from stored procedures were being ignored completely. I wrote a patch to fix both of these issues: http://bin.cakephp.org/view/746723497 (dbo_source.php) and http://bin.cakephp.org/view/599111130 (dbo_mysqli.php). Despite my efforts however, I am still getting the 'commands out of sync' error when I try to do this in my model: $this->query('CALL my_stored_proc()'); I thought maybe it was my own problem, and not CakePHP's, so I tried this: http://bin.cakephp.org/view/1717786074 . It runs without errors, so I can only think that this is a problem with the MySQLi database driver somehow keeping resultsets around too long. Any suggestions on how to continue and make stored procedures work, would be appreciated. Regards, -- Isaac --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
