bradgrafelman;10970407 wrote:Does it work if you use a library that's not old and outdated (e.g. [man]mysqli[/man], [man]PDO[/man], ... anything but mysql)?
I use the mysqli interface, which is quite OK. I have used the mysqli converter tool from mysql dev site, so, everything is set OK. I have only one SP so far, and I don't know how to fix that problem. Forgot to mention:
php -v
PHP 5.3.3 (cli)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo
mysql 5.1
I plan to use on with a similar sightly older PHP and MySQL 5.0 (that's what my host has). Executing the the exact same series of SQLs I do from in the PHP from the mysql client I have no problem.
Note, that I use the procedural calls. Also note that I use the mysql_free_result after each SQL call.
When I used a "solution" (repeatedly call the free) with the following function I found in php.net:
1. function clearStoredResults($mysqli_link){
2. do{
3. if($l_result = $mysqli_link->store_result()){
4. $l_result->free();
5. }
6. } while($mysqli_link->next_result());
7. }
I do not have the error, BUT, I have an error at line 3:
mysqli::next_result(): There is no next result set. Please, call mysqli_more_results()/mysqli::more_results() to check whether to call this function/method in
The strange thing is that I call the function as:
if (mysqli_more_results($GLOBALS["___mysqli_ston"]))
clearStoredResults($GLOBALS["___mysqli_ston"]);
Another strange thing:
When I call the mysql_free_result just after the SP call, I have a failure! Why?
Generally, how on earth do you correctly call a SP in the middle of SQL queries?