According to this link "
http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html" the sql
result set should be freed from memory in order to execute consequent
queries after each other, am not sure if this is a bug in CakePHP or not but
it seems that the result set is not being freed from memory after executing
the queries consequently.
is there any way that i can call mysql_free_result from the controller in
order to the following:
$mostWatched = $this->Video->query('CALL SP_getMostViewedVideos(1,3)');
*$this->Video->freeUserDefinedQueryResultSet();*
$mostRated = $this->Video->query('CALL SP_getMostRatedVideos(1,3)');
*$this->Video->freeUserDefinedQueryResultSet();*
$resentAdded = $this->Video->query('CALL SP_getMostRecentVideos(1,3)');
*$this->Video->freeUserDefinedQueryResultSet();*
though this should be done from the core but it doesn't seem to be working!
i am using version 1.1.19.6305, i forgot to say so above and am sorry for
that, anyone?
On Mon, May 19, 2008 at 6:06 AM, Ma'moon <[EMAIL PROTECTED]> wrote:
> Hello guys,
> i have a problem where i am trying to execute the following queries in my
> controller "consequently!":
> $mostWatched = $this->Video->query('CALL SP_getMostViewedVideos(1,3)');
> $mostRated = $this->Video->query('CALL SP_getMostRatedVideos(1,3)');
> $resentAdded = $this->Video->query('CALL SP_getMostRecentVideos(1,3)');
> and it results to "*SQL Error: 2014: Commands out of sync; you can't run
> this command now in cake/libs/model/datasources/dbo_source.php on line 440
> *"
>
> i would really appreciate it if any one can tell me why this is happening
> and how to solve it!
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---