[Openfirst-cvscommit] base/includes MSSQLDataBase.php,1.2,1.3 MySQLDataBase.php,1.3,1.4 ODBCDataBase
Brought to you by:
xtimg
From: Jamie <ast...@us...> - 2005-11-22 03:32:50
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9969/includes Modified Files: MSSQLDataBase.php MySQLDataBase.php ODBCDataBase.php dbase.php Log Message: - Added option to makeSelectOps (or w/e) - Added fetchArray() from the 1.1 branch Index: MSSQLDataBase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/MSSQLDataBase.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MSSQLDataBase.php 15 Oct 2005 19:21:01 -0000 1.2 --- MSSQLDataBase.php 22 Nov 2005 03:32:42 -0000 1.3 *************** *** 111,114 **** --- 111,120 ---- return mssql_fetch_object($resource); } + + function fetchArray($resource, $rownumber = false) { + $this->checkForFunction('mssql_fetch_assoc'); + //@NOTE mssql_fetch_assoc() is undocumented. + return mssql_fetch_assoc($resource); + } function numberOfRows($resource) { Index: ODBCDataBase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/ODBCDataBase.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ODBCDataBase.php 15 Oct 2005 19:21:01 -0000 1.1 --- ODBCDataBase.php 22 Nov 2005 03:32:42 -0000 1.2 *************** *** 87,90 **** --- 87,99 ---- } + function fetchArray($resource, $rownumber = false) { + $this->checkForFunction('odbc_fetch_array'); + if($rownumber !== false) { + return odbc_fetch_array($resource, $rownumber); + } else { + return odbc_fetch_array($resource); + } + } + function numberOfRows($resource) { $this->checkForFunction('odbc_num_rows'); Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/dbase.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dbase.php 20 Nov 2005 21:45:10 -0000 1.14 --- dbase.php 22 Nov 2005 03:32:42 -0000 1.15 *************** *** 108,111 **** --- 108,116 ---- # Override } + + function fetchArray($resource, $rownumber = false) { + # Override + } + function numberOfRows($resource) { *************** *** 262,265 **** --- 267,272 ---- if ( isset( $options['ORDER BY'] ) ) { $tailOpts .= " ORDER BY {$options['ORDER BY']}"; + } else if ( isset( $options['order'] ) ) { + $tailOpts .= " ORDER BY ".$this->quoteField($options['order']); } if ( isset( $options['LIMIT'] ) ) { Index: MySQLDataBase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/MySQLDataBase.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MySQLDataBase.php 19 Oct 2005 03:59:48 -0000 1.3 --- MySQLDataBase.php 22 Nov 2005 03:32:42 -0000 1.4 *************** *** 85,88 **** --- 85,93 ---- } + function fetchArray($resource, $rownumber = false) { + $this->checkForFunction('mysql_fetch_assoc'); + return mysql_fetch_assoc($resource); + } + function numberOfRows($resource) { $this->checkForFunction('mysql_num_rows'); |