Yeah, for some odd reason, I keep getting this error:
Couldn't fetch mysqli_result in
/usr/local/lib/php/creole/drivers/mysqli/MySQLiResultSet.php on line 101
Which is the @mysql_free_result($this->result); line. When I put the
is_resource check around it, it stopped throwing this error.
I have experienced this error in both the MySQLi and MySQL drivers. It
appears as if $this->result is getting reset someplace. Not too sure where.
Jordan
Tony Bibbs wrote:
The @ will suppress any errors so it basically saves having to do the
is_resource check. Is there something particularly bothersome about
how it is now?
--Tony
Jordan S. Jones wrote:
I have noticed that in most of the drivers, the close method of the
ResultSet classes look something like the following:
/**
* @see ResultSet::close()
*/
function close()
{ @mysql_free_result($this->result);
$this->fields = array();
}
My question is, why not use is_resource? Something like this:
/**
* @see ResultSet::close()
*/
function close()
{
if (!is_resource ($this->result))
{
@mysql_free_result($this->result);
}
$this->fields = array();
}
Jordan S. Jones
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxx
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxx
|