PG class updates, basic class updates
In basic class, do SET_SESSION_NAME check with isset to avoid notice log entries. Change log/error return for execute data error base postgresql calss calls set the last run query on error if no result is returned for prepare and execute
This commit is contained in:
@@ -112,7 +112,10 @@
|
||||
// DESC : wrapper for pg_prepare
|
||||
public function _db_prepare($name, $query)
|
||||
{
|
||||
return @pg_prepare($this->dbh, $name, $query);
|
||||
$result = @pg_prepare($this->dbh, $name, $query);
|
||||
if (!$result)
|
||||
$this->last_error_query = $query;
|
||||
return $result;
|
||||
}
|
||||
|
||||
// METHOD: _db_execute
|
||||
@@ -121,7 +124,10 @@
|
||||
// DESC : wrapper for pg_execute for running a prepared statement
|
||||
public function _db_execute($name, $data)
|
||||
{
|
||||
return @pg_execute($this->dbh, $name, $data);
|
||||
$result = @pg_execute($this->dbh, $name, $data);
|
||||
if (!$result)
|
||||
$this->last_error_query = $query;
|
||||
return $result;
|
||||
}
|
||||
|
||||
// METHOD: _db_num_rows
|
||||
|
||||
Reference in New Issue
Block a user