Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/license.php *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/license.php *
|
* $Id: db_pgsql.php 5332 2011-01-14 12:07:07Z Tomm $
| * $Id$
|
*/
class DB_PgSQL
| */
class DB_PgSQL
|
Zeile 143 | Zeile 143 |
---|
* @var float */ public $query_time = 0;
|
* @var float */ public $query_time = 0;
|
| /** * The last result run on the database (needed for affected_rows) * * @var resource */ public $last_result;
|
/** * Connect to the database server.
| /** * Connect to the database server.
|
Zeile 199 | Zeile 206 |
---|
foreach($connections[$type] as $single_connection) { $connect_function = "pg_connect";
|
foreach($connections[$type] as $single_connection) { $connect_function = "pg_connect";
|
if($single_connection['pconnect'])
| if(isset($single_connection['pconnect']))
|
{ $connect_function = "pg_pconnect"; }
| { $connect_function = "pg_pconnect"; }
|
Zeile 282 | Zeile 289 |
---|
{ global $pagestarttime, $db, $mybb;
|
{ global $pagestarttime, $db, $mybb;
|
$string = preg_replace("#LIMIT ([0-9]+),([ 0-9]+)#i", "LIMIT $2 OFFSET $1", $string);
| $string = preg_replace("#LIMIT (\s*)([0-9]+),(\s*)([0-9]+)$#im", "LIMIT $4 OFFSET $2", trim($string));
|
$this->last_query = $string;
| $this->last_query = $string;
|
Zeile 321 | Zeile 328 |
---|
$query_time = $this->get_execution_time(); $this->query_time += $query_time; $this->query_count++;
|
$query_time = $this->get_execution_time(); $this->query_time += $query_time; $this->query_count++;
|
| $this->last_result = $query;
|
if($mybb->debug_mode) {
| if($mybb->debug_mode) {
|
Zeile 357 | Zeile 365 |
---|
"<td colspan=\"8\" style=\"background-color: #ccc;\"><strong>#".$this->query_count." - Select Query</strong></td>\n". "</tr>\n". "<tr>\n".
|
"<td colspan=\"8\" style=\"background-color: #ccc;\"><strong>#".$this->query_count." - Select Query</strong></td>\n". "</tr>\n". "<tr>\n".
|
"<td colspan=\"8\" style=\"background-color: #fefefe;\"><span style=\"font-family: Courier; font-size: 14px;\">".$string."</span></td>\n".
| "<td colspan=\"8\" style=\"background-color: #fefefe;\"><span style=\"font-family: Courier; font-size: 14px;\">".htmlspecialchars_uni($string)."</span></td>\n".
|
"</tr>\n". "<tr style=\"background-color: #efefef;\">\n". "<td><strong>Info</strong></td>\n".
| "</tr>\n". "<tr style=\"background-color: #efefef;\">\n". "<td><strong>Info</strong></td>\n".
|
Zeile 569 | Zeile 577 |
---|
*/ function affected_rows() {
|
*/ function affected_rows() {
|
return pg_affected_rows($this->current_link);
| return pg_affected_rows($this->last_result);
|
}
/**
| }
/**
|