Feature #24039 ยป t3lib_db-sql_fetch_object.diff
class.t3lib_db.php (working copy) | ||
---|---|---|
}
|
||
/**
|
||
* Returns an object of class $class that corresponds to the fetched row, or FALSE if there are no more rows.
|
||
* mysql_fetch_object() wrapper function
|
||
*
|
||
* @param pointer MySQL result pointer (of SELECT query) / DBAL object
|
||
* @param string Classname to use when creating model; stdClass when omitted
|
||
* @param string Parameters to pass to constructor when initializing $class
|
||
* @return object Object containing result record.
|
||
*/
|
||
public function sql_fetch_object($res, $class=NULL, $parameters=array()) {
|
||
if ($this->debug_check_recordset($res)) {
|
||
if ($class) {
|
||
return mysql_fetch_object($res, $class, $parameters);
|
||
} else {
|
||
return mysql_fetch_object($res);
|
||
}
|
||
} else {
|
||
return FALSE;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Free result memory
|
||
* mysql_free_result() wrapper function
|
||
* Usage count/core: 3
|