<?php
+# $Id$
+# This file deals with MySQL interface functions
+# and query specifics/optimisations
+#
require_once( "CacheManager.php" );
define( "DB_READ", -1 );
}
return $row;
}
+
+ function fetchRow( $res ) {
+ @$row = mysql_fetch_array( $res );
+ if (mysql_errno() ) {
+ wfDebugDieBacktrace( "SQL error: " . htmlspecialchars( mysql_error() ) );
+ }
+ return $row;
+ }
+
function numRows( $res ) {
@$n = mysql_num_rows( $res );
if( mysql_errno() ) {
return $db->fetchObject( $res );
}
+function wfFetchRow( $res )
+{
+ $db =& wfGetDB();
+ return $db->fetchRow ( $res );
+}
+
function wfNumRows( $res )
{
$db =& wfGetDB();
}
return $row;
}
+
+ function fetchRow( $res ) {
+ @$row = pg_fetch_array( $res );
+ if( pg_last_error($this->mConn) ) {
+ wfDebugDieBacktrace( "SQL error: " . htmlspecialchars( pg_last_error($this->mConn) ) );
+ }
+ return $row;
+ }
+
function numRows( $res ) {
@$n = pg_num_rows( $res );
if( pg_last_error($this->mConn) ) {