Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / pnadodb / drivers [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
07 Aug 2002 00:45:30 | postnuke_official/html/pnadodb/drivers | adodb-ado.inc.php,1.1.2.3,1.1.2.4 adodb-fbsql.inc.php,1.1.2.3,1.1.2.4 adodb-ibase.inc.php,1.1.2.2,1.1.2.3 adodb-informix.inc.php,1.1.2.3,1.1.2.4 adodb-mssql.inc.php,1.1.2.3,1.1.2.4 adodb-oci8.inc.php,1.1.2.3,1.1.2.4 adodb-oci805.inc.php,1.2.2.2,1.2.2.3 ad | Pablo Roca |
ADODB 2.30 |
Update of /home/cvsroot/postnuke_official/html/pnadodb/drivers In directory ns7.hostnuke.net:/tmp/cvs-serv21562 Modified Files: Tag: PostNuke_71 adodb-ado.inc.php adodb-fbsql.inc.php adodb-ibase.inc.php adodb-informix.inc.php adodb-mssql.inc.php adodb-oci8.inc.php adodb-oci805.inc.php adodb-postgres64.inc.php adodb-sqlanywhere.inc.php Log Message: ADODB 2.30 Index: adodb-ado.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-ado.inc.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** adodb-ado.inc.php 21 Jul 2002 02:27:35 -0000 1.1.2.3 --- adodb-ado.inc.php 7 Aug 2002 00:45:27 -0000 1.1.2.4 *************** *** 9,13 **** Latest version is available at http://php.weblogs.com/ ! Microsoft ADO data driver. Requires ADO. Works only on MS Windows. */ define("_ADODB_ADO_LAYER", 1 ); --- 9,13 ---- Latest version is available at http://php.weblogs.com/ ! Microsoft ADO data driver. Requires ADO. Works only on MS Windows. */ define("_ADODB_ADO_LAYER", 1 ); *************** *** 22,26 **** var $replaceQuote = "''"; // string to use to replace quotes var $dataProvider = "ado"; ! var $hasAffectedRows = true; var $adoParameterType = 201; // 201 = long varchar, 203=long wide varchar, 205 = long varbinary var $_affectedRows = false; --- 22,26 ---- var $replaceQuote = "''"; // string to use to replace quotes var $dataProvider = "ado"; ! var $hasAffectedRows = true; var $adoParameterType = 201; // 201 = long varchar, 203=long wide varchar, 205 = long varbinary var $_affectedRows = false; *************** *** 31,35 **** var $_lock_type = -1; var $_execute_option = -1; ! function ADODB_ado() --- 31,35 ---- var $_lock_type = -1; var $_execute_option = -1; ! function ADODB_ado() *************** *** 38,46 **** ! function _affectedrows() ! { ! return $this->_affectedRows; ! } ! // you can also pass a connection string like this: // --- 38,46 ---- ! function _affectedrows() ! { ! return $this->_affectedRows; ! } ! // you can also pass a connection string like this: // *************** *** 73,77 **** if ($argPassword)$argHostname .= ";$p=$argPassword"; ! if ($this->debug) print "<p>Host=".$argHostname."<BR>version=$dbc->version</p>"; // @ added below for php 4.0.1 and earlier @$dbc->Open((string) $argHostname); --- 73,77 ---- if ($argPassword)$argHostname .= ";$p=$argPassword"; ! if ($this->debug) ADOConnection::outp( "Host=".$argHostname."<BR>\n version=$dbc->version"); // @ added below for php 4.0.1 and earlier @$dbc->Open((string) $argHostname); *************** *** 215,219 **** $rs = new COM('ADODB.Recordset'); if ($rs) { ! $rs->Open ($sql, $dbc, $this->_cursor_type,$this->_lock_type, $this->_execute_option); } */ --- 215,219 ---- $rs = new COM('ADODB.Recordset'); if ($rs) { ! $rs->Open ($sql, $dbc, $this->_cursor_type,$this->_lock_type, $this->_execute_option); } */ *************** *** 292,298 **** var $_tarr = false; // caches the types var $_flds; // and field objects ! var $canSeek = true; var $hideErrors = true; ! function ADORecordSet_ado(&$id) { --- 292,298 ---- var $_tarr = false; // caches the types var $_flds; // and field objects ! var $canSeek = true; var $hideErrors = true; ! function ADORecordSet_ado(&$id) { *************** *** 348,360 **** ! // should only be used to move forward as we normally use forward-only cursors function _seek($row) { ! $rs = $this->_queryID; ! // absoluteposition doesn't work -- my maths is wrong ? ! // $rs->AbsolutePosition->$row-2; ! // return true; ! if ($this->_currentRow > $row) return false; ! @$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst return true; } --- 348,360 ---- ! // should only be used to move forward as we normally use forward-only cursors function _seek($row) { ! $rs = $this->_queryID; ! // absoluteposition doesn't work -- my maths is wrong ? ! // $rs->AbsolutePosition->$row-2; ! // return true; ! if ($this->_currentRow > $row) return false; ! @$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst return true; } *************** *** 363,368 **** OLEDB types ! enum DBTYPEENUM ! { DBTYPE_EMPTY = 0, DBTYPE_NULL = 1, DBTYPE_I2 = 2, --- 363,368 ---- OLEDB types ! enum DBTYPEENUM ! { DBTYPE_EMPTY = 0, DBTYPE_NULL = 1, DBTYPE_I2 = 2, *************** *** 528,532 **** break; case 6: // currency is not supported properly; ! print '<br><b>'.$f->Name.': currency type not supported by PHP</b><br>'; $this->fields[] = (float) $f->value; break; --- 528,532 ---- break; case 6: // currency is not supported properly; ! ADOConnection::outp( '<b>'.$f->Name.': currency type not supported by PHP</b>'); $this->fields[] = (float) $f->value; break; *************** *** 558,568 **** /* ! ID: 18253 ! Updated by: mkools@euronet.nl ! Reported By: mkools@euronet.nl ! Status: Bogus ! Bug Type: COM related Operating System: Windows 2000 Pro SP2 ! PHP Version: 4.2.1 New Comment: --- 558,568 ---- /* ! ID: 18253 ! Updated by: mkools@euronet.nl ! Reported By: mkools@euronet.nl ! Status: Bogus ! Bug Type: COM related Operating System: Windows 2000 Pro SP2 ! PHP Version: 4.2.1 New Comment: *************** *** 608,614 **** update or delete statement. What I have now is this: ! $Vrows = new VARIANT( 0, VT_I4|VT_BYREF); ! $this->QueryResult = @$this->Link->Execute( $inQuery, $Vrows); ! $this->AffectedRows = $Vrows->value; Explaination: QueryResult will be my RecordSet, Link is the ADO --- 608,614 ---- update or delete statement. What I have now is this: ! $Vrows = new VARIANT( 0, VT_I4|VT_BYREF); ! $this->QueryResult = @$this->Link->Execute( $inQuery, $Vrows); ! $this->AffectedRows = $Vrows->value; Explaination: QueryResult will be my RecordSet, Link is the ADO *************** *** 618,622 **** select statements). The second things I've tried is: ! $this->QueryResult = @$this->Link->Execute( $inQuery, &$this->AffectedRows); --- 618,622 ---- select statements). The second things I've tried is: ! $this->QueryResult = @$this->Link->Execute( $inQuery, &$this->AffectedRows); Index: adodb-fbsql.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-fbsql.inc.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** adodb-fbsql.inc.php 21 Jul 2002 02:27:35 -0000 1.1.2.3 --- adodb-fbsql.inc.php 7 Aug 2002 00:45:27 -0000 1.1.2.4 *************** *** 1,5 **** <?php /* ! @version V2.21 19 July 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! @version V2.30 1 Aug 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 14,19 **** class ADODB_fbsql extends ADOConnection { var $databaseType = 'fbsql'; ! var $hasInsertID = true; ! var $hasAffectedRows = true; var $metaTablesSQL = "SHOW TABLES"; var $metaColumnsSQL = "SHOW COLUMNS FROM %s"; --- 14,19 ---- class ADODB_fbsql extends ADOConnection { var $databaseType = 'fbsql'; ! var $hasInsertID = true; ! var $hasAffectedRows = true; var $metaTablesSQL = "SHOW TABLES"; var $metaColumnsSQL = "SHOW COLUMNS FROM %s"; *************** *** 25,37 **** } ! function _insertid() ! { ! return fbsql_insert_id($this->_connectionID); ! } ! ! function _affectedrows() ! { ! return fbsql_affected_rows($this->_connectionID); ! } function &MetaDatabases() --- 25,37 ---- } ! function _insertid() ! { ! return fbsql_insert_id($this->_connectionID); ! } ! ! function _affectedrows() ! { ! return fbsql_affected_rows($this->_connectionID); ! } function &MetaDatabases() *************** *** 134,138 **** { $this->_errorMsg = @fbsql_error($this->_connectionID); ! return $this->_errorMsg; } --- 134,138 ---- { $this->_errorMsg = @fbsql_error($this->_connectionID); ! return $this->_errorMsg; } Index: adodb-ibase.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-ibase.inc.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** adodb-ibase.inc.php 11 Jul 2002 09:56:20 -0000 1.1.2.2 --- adodb-ibase.inc.php 7 Aug 2002 00:45:27 -0000 1.1.2.3 *************** *** 25,35 **** class ADODB_ibase extends ADOConnection { ! var $databaseType = "ibase"; var $dataProvider = "ibase"; ! var $replaceQuote = "\'"; // string to use to replace quotes ! var $fmtDate = "'Y-m-d'"; ! var $fmtTimeStamp = "'Y-m-d, H:i:s'"; ! var $concat_operator='||'; ! var $_transactionID; var $metaTablesSQL = "select rdb\$relation_name from rdb\$relations where rdb\$relation_name not like 'RDB\$%'"; var $metaColumnsSQL = "select a.rdb\$field_name,b.rdb\$field_type,b.rdb\$field_length from rdb\$relation_fields a join rdb\$fields b on a.rdb\$field_source=b.rdb\$field_name where rdb\$relation_name ='%s'"; --- 25,35 ---- class ADODB_ibase extends ADOConnection { ! var $databaseType = "ibase"; var $dataProvider = "ibase"; ! var $replaceQuote = "\'"; // string to use to replace quotes ! var $fmtDate = "'Y-m-d'"; ! var $fmtTimeStamp = "'Y-m-d, H:i:s'"; ! var $concat_operator='||'; ! var $_transactionID; var $metaTablesSQL = "select rdb\$relation_name from rdb\$relations where rdb\$relation_name not like 'RDB\$%'"; var $metaColumnsSQL = "select a.rdb\$field_name,b.rdb\$field_type,b.rdb\$field_length from rdb\$relation_fields a join rdb\$fields b on a.rdb\$field_source=b.rdb\$field_name where rdb\$relation_name ='%s'"; *************** *** 43,57 **** var $ansiOuter = true; ! function ADODB_ibase() { ! ibase_timefmt('%Y-%m-%d'); } ! function BeginTrans() ! { ! $this->autoCommit = false; ! $this->_transactionID = $this->_connectionID;//ibase_trans($this->ibasetrans, $this->_connectionID); ! return $this->_transactionID; } --- 43,57 ---- var $ansiOuter = true; ! function ADODB_ibase() { ! ibase_timefmt('%Y-%m-%d'); } ! function BeginTrans() ! { ! $this->autoCommit = false; ! $this->_transactionID = $this->_connectionID;//ibase_trans($this->ibasetrans, $this->_connectionID); ! return $this->_transactionID; } *************** *** 62,66 **** $this->autoCommit = true; if ($this->_transactionID) { ! //print ' commit '; $ret = ibase_commit($this->_transactionID); } --- 62,66 ---- $this->autoCommit = true; if ($this->_transactionID) { ! //print ' commit '; $ret = ibase_commit($this->_transactionID); } *************** *** 74,78 **** $this->autoCommit = true; if ($this->_transactionID) ! $ret = ibase_rollback($this->_transactionID); $this->_transactionID = false; --- 74,78 ---- $this->autoCommit = true; if ($this->_transactionID) ! $ret = ibase_rollback($this->_transactionID); $this->_transactionID = false; *************** *** 152,158 **** } ! function SelectDB($dbName) { ! return false; ! } function _handleerror() --- 152,158 ---- } ! function SelectDB($dbName) { ! return false; ! } function _handleerror() *************** *** 161,181 **** } ! function ErrorNo() { if (preg_match('/error code = ([\-0-9]*)/i', $this->_errorMsg,$arr)) return (integer) $arr[1]; else return 0; ! } ! function ErrorMsg() { ! return $this->_errorMsg; ! } ! // returns true or false ! function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) ! { //if ($this->charSet !== false) $this->_connectionID = ibase_connect($argHostname,$argUsername,$argPassword,$this->charSet,$this->buffers,$this->dialect); ! // else // $this->_connectionID = ibase_connect($argHostname,$argUsername,$argPassword); ! if ($this->_connectionID === false) { $this->_handleerror(); --- 161,181 ---- } ! function ErrorNo() { if (preg_match('/error code = ([\-0-9]*)/i', $this->_errorMsg,$arr)) return (integer) $arr[1]; else return 0; ! } ! function ErrorMsg() { ! return $this->_errorMsg; ! } ! // returns true or false ! function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) ! { //if ($this->charSet !== false) $this->_connectionID = ibase_connect($argHostname,$argUsername,$argPassword,$this->charSet,$this->buffers,$this->dialect); ! // else // $this->_connectionID = ibase_connect($argHostname,$argUsername,$argPassword); ! if ($this->_connectionID === false) { $this->_handleerror(); *************** *** 183,203 **** } ! return true; ! } ! // returns true or false ! function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) ! { //if ($this->charSet !== false) $this->_connectionID = ibase_pconnect($argHostname,$argUsername,$argPassword,$this->charSet,$this->buffers,$this->dialect); ! // else // $this->_connectionID = ibase_pconnect($argHostname,$argUsername,$argPassword); ! ! if ($this->_connectionID === false) { $this->_handleerror(); return false; } ! ! return true; ! } function Prepare($sql) --- 183,203 ---- } ! return true; ! } ! // returns true or false ! function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) ! { //if ($this->charSet !== false) $this->_connectionID = ibase_pconnect($argHostname,$argUsername,$argPassword,$this->charSet,$this->buffers,$this->dialect); ! // else // $this->_connectionID = ibase_pconnect($argHostname,$argUsername,$argPassword); ! ! if ($this->_connectionID === false) { $this->_handleerror(); return false; } ! ! return true; ! } function Prepare($sql) *************** *** 209,216 **** } ! // returns query ID if successful, otherwise false // there have been reports of problems with nested queries - the code is probably not re-entrant? ! function _query($sql,$iarr=false) ! { if (is_array($sql)) { $fn = 'ibase_execute'; --- 209,216 ---- } ! // returns query ID if successful, otherwise false // there have been reports of problems with nested queries - the code is probably not re-entrant? ! function _query($sql,$iarr=false) ! { if (is_array($sql)) { $fn = 'ibase_execute'; *************** *** 235,257 **** case 6: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5]); break; case 7: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6]); break; ! default: print "<p>Too many parameters to ibase query $sql</p>"; case 8: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6],$iarr[7]); break; } } else $ret = $fn($conn,$sql); ! if ($docommit && $ret === true) ibase_commit($this->_connectionID); $this->_handleerror(); ! return $ret; ! } ! // returns true or false ! function _close() ! { ! if (!$this->autoCommit) @ibase_rollback($this->_connectionID); ! return @ibase_close($this->_connectionID); ! } ! // returns array of ADOFieldObjects for current table function &MetaColumns($table) { --- 235,257 ---- case 6: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5]); break; case 7: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6]); break; ! default: ADOConnection::outp( "Too many parameters to ibase query $sql"); case 8: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6],$iarr[7]); break; } } else $ret = $fn($conn,$sql); ! if ($docommit && $ret === true) ibase_commit($this->_connectionID); $this->_handleerror(); ! return $ret; ! } ! // returns true or false ! function _close() ! { ! if (!$this->autoCommit) @ibase_rollback($this->_connectionID); ! return @ibase_close($this->_connectionID); ! } ! // returns array of ADOFieldObjects for current table function &MetaColumns($table) { *************** *** 339,343 **** /*-------------------------------------------------------------------------------------- ! Class Name: Recordset --------------------------------------------------------------------------------------*/ --- 339,343 ---- /*-------------------------------------------------------------------------------------- ! Class Name: Recordset --------------------------------------------------------------------------------------*/ *************** *** 345,399 **** { ! var $databaseType = "ibase"; var $bind=false; ! function ADORecordset_ibase($id) ! { global $ADODB_FETCH_MODE; $this->fetchMode = $ADODB_FETCH_MODE; ! return $this->ADORecordSet($id); ! } ! /* Returns: an object containing field information. ! Get column information in the Recordset object. fetchField() can be used in order to obtain information about ! fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by ! fetchField() is retrieved. */ ! function &FetchField($fieldOffset = -1) ! { ! $fld = new ADOFieldObject; ! $ibf = ibase_field_info($this->_queryID,$fieldOffset); ! $fld->name = strtolower($ibf['alias']); if (empty($fld->name)) $fld->name = strtolower($ibf['name']); ! $fld->type = $ibf['type']; ! $fld->max_length = $ibf['length']; ! if ($this->debug) print_r($fld); ! return $fld; ! } ! function _initrs() ! { ! $this->_numOfRows = -1; ! $this->_numOfFields = @ibase_num_fields($this->_queryID); ! } ! function _seek($row) ! { ! return false; ! } ! function _fetch() { ! $f = ibase_fetch_row($this->_queryID); ! if ($f === false) return false; ! $this->fields = $f; if ($this->fetchMode & ADODB_FETCH_ASSOC) { $this->fields = $this->GetRowAssoc(false); } ! return true; ! } /* Use associative array to get fields array */ --- 345,399 ---- { ! var $databaseType = "ibase"; var $bind=false; ! function ADORecordset_ibase($id) ! { global $ADODB_FETCH_MODE; $this->fetchMode = $ADODB_FETCH_MODE; ! return $this->ADORecordSet($id); ! } ! /* Returns: an object containing field information. ! Get column information in the Recordset object. fetchField() can be used in order to obtain information about ! fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by ! fetchField() is retrieved. */ ! function &FetchField($fieldOffset = -1) ! { ! $fld = new ADOFieldObject; ! $ibf = ibase_field_info($this->_queryID,$fieldOffset); ! $fld->name = strtolower($ibf['alias']); if (empty($fld->name)) $fld->name = strtolower($ibf['name']); ! $fld->type = $ibf['type']; ! $fld->max_length = $ibf['length']; ! if ($this->debug) print_r($fld); ! return $fld; ! } ! function _initrs() ! { ! $this->_numOfRows = -1; ! $this->_numOfFields = @ibase_num_fields($this->_queryID); ! } ! function _seek($row) ! { ! return false; ! } ! function _fetch() { ! $f = ibase_fetch_row($this->_queryID); ! if ($f === false) return false; ! $this->fields = $f; if ($this->fetchMode & ADODB_FETCH_ASSOC) { $this->fields = $this->GetRowAssoc(false); } ! return true; ! } /* Use associative array to get fields array */ *************** *** 414,425 **** ! function _close() { ! return @ibase_free_result($this->_queryID); ! } ! function MetaType($t,$len=-1) ! { ! switch (strtoupper($t)) { case 'CHAR': return 'C'; --- 414,425 ---- ! function _close() { ! return @ibase_free_result($this->_queryID); ! } ! function MetaType($t,$len=-1) ! { ! switch (strtoupper($t)) { case 'CHAR': return 'C'; *************** *** 427,448 **** case 'TEXT': case 'VARCHAR': ! case 'VARYING': ! if ($len <= $this->blobSize) return 'C'; return 'X'; case 'BLOB': ! return 'B'; ! ! case 'TIMESTAMP': ! case 'DATE': return 'D'; ! ! //case 'T': return 'T'; ! //case 'L': return 'L'; case 'INT': case 'SHORT': case 'INTEGER': return 'I'; ! default: return 'N'; ! } ! } } ?> --- 427,448 ---- case 'TEXT': case 'VARCHAR': ! case 'VARYING': ! if ($len <= $this->blobSize) return 'C'; return 'X'; case 'BLOB': ! return 'B'; ! ! case 'TIMESTAMP': ! case 'DATE': return 'D'; ! ! //case 'T': return 'T'; ! //case 'L': return 'L'; case 'INT': case 'SHORT': case 'INTEGER': return 'I'; ! default: return 'N'; ! } ! } } ?> Index: adodb-informix.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-informix.inc.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** adodb-informix.inc.php 21 Jul 2002 02:27:35 -0000 1.1.2.3 --- adodb-informix.inc.php 7 Aug 2002 00:45:27 -0000 1.1.2.4 *************** *** 1,5 **** <?php /** ! * @version V2.21 19 July 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /** ! * @version V2.30 1 Aug 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, Index: adodb-mssql.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-mssql.inc.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** adodb-mssql.inc.php 21 Jul 2002 02:27:35 -0000 1.1.2.3 --- adodb-mssql.inc.php 7 Aug 2002 00:45:27 -0000 1.1.2.4 *************** *** 60,64 **** if ($anum > 0) { if ($anum > 31) { ! print "<p>MSSQL: YYYY-MM-DD date format not supported currently</p>"; } else $ADODB_mssql_date_order = 'dmy'; --- 60,64 ---- if ($anum > 0) { if ($anum > 31) { ! ADOConnection::outp( "MSSQL: YYYY-MM-DD date format not supported currently"); } else $ADODB_mssql_date_order = 'dmy'; *************** *** 75,79 **** var $fmtTimeStamp = "'Y-m-d h:i:sA'"; var $hasInsertID = true; ! var $hasAffectedRows = true; var $metaTablesSQL="select name from sysobjects where type='U' or type='V' and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE'))"; var $metaColumnsSQL = "select c.name,t.name,c.length from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'"; --- 75,79 ---- var $fmtTimeStamp = "'Y-m-d h:i:sA'"; var $hasInsertID = true; ! var $hasAffectedRows = true; var $metaTablesSQL="select name from sysobjects where type='U' or type='V' and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE'))"; var $metaColumnsSQL = "select c.name,t.name,c.length from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'"; *************** *** 96,115 **** } ! // might require begintrans -- committrans ! function _insertid() ! { ! return $this->GetOne('select @@identity'); ! } ! // might require begintrans -- committrans ! function _affectedrows() ! { ! return $this->GetOne('select @@rowcount'); ! } ! function BeginTrans() ! { $this->_hastrans = true; ! $this->Execute('BEGIN TRAN'); ! return true; } --- 96,115 ---- } ! // might require begintrans -- committrans ! function _insertid() ! { ! return $this->GetOne('select @@identity'); ! } ! // might require begintrans -- committrans ! function _affectedrows() ! { ! return $this->GetOne('select @@rowcount'); ! } ! function BeginTrans() ! { $this->_hastrans = true; ! $this->Execute('BEGIN TRAN'); ! return true; } *************** *** 142,147 **** if (!$this->_hastrans) return false; $this->_hastrans = false; ! $this->Execute('COMMIT TRAN'); ! return true; } function RollbackTrans() --- 142,147 ---- if (!$this->_hastrans) return false; $this->_hastrans = false; ! $this->Execute('COMMIT TRAN'); ! return true; } function RollbackTrans() *************** *** 149,154 **** if (!$this->_hastrans) return false; $this->_hastrans = false; ! $this->Execute('ROLLBACK TRAN'); ! return true; } --- 149,154 ---- if (!$this->_hastrans) return false; $this->_hastrans = false; ! $this->Execute('ROLLBACK TRAN'); ! return true; } *************** *** 174,194 **** function MetaDatabases() { ! if(@mssql_select_db("master")) { ! $qry="select name from sysdatabases where name <> 'master'"; ! if($rs=@mssql_query($qry)){ ! $tmpAr=$ar=array(); ! while($tmpAr=@mssql_fetch_row($rs)) ! $ar[]=$tmpAr[0]; ! @mssql_select_db($this->databaseName); ! if(sizeof($ar)) ! return($ar); ! else ! return(false); ! } else { ! @mssql_select_db($this->databaseName); ! return(false); ! } ! } ! return(false); } --- 174,194 ---- function MetaDatabases() { ! if(@mssql_select_db("master")) { ! $qry="select name from sysdatabases where name <> 'master'"; ! if($rs=@mssql_query($qry)){ ! $tmpAr=$ar=array(); ! while($tmpAr=@mssql_fetch_row($rs)) ! $ar[]=$tmpAr[0]; ! @mssql_select_db($this->databaseName); ! if(sizeof($ar)) ! return($ar); ! else ! return(false); ! } else { ! @mssql_select_db($this->databaseName); ! return(false); ! } ! } ! return(false); } *************** *** 214,218 **** { if (empty($this->_errorMsg)) { ! $this->_errorMsg = mssql_get_last_message(); print " D E F $this->_errorMsg"; } $id = @mssql_query("select @@ERROR",$this->_connectionID); --- 214,218 ---- { if (empty($this->_errorMsg)) { ! $this->_errorMsg = mssql_get_last_message(); } $id = @mssql_query("select @@ERROR",$this->_connectionID); *************** *** 221,225 **** @mssql_free_result($id); if (is_array($arr)) return $arr[0]; ! else return -1; } --- 221,225 ---- @mssql_free_result($id); if (is_array($arr)) return $arr[0]; ! else return -1; } *************** *** 257,261 **** { if (!$this->_has_mssql_init) { ! print "PrepareSP: mssql_init only available since PHP 4.1.0<br>\n"; return $sql; } --- 257,261 ---- { if (!$this->_has_mssql_init) { ! ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0"); return $sql; } *************** *** 286,290 **** { if (!$this->_has_mssql_init) { ! print "Parameter: mssql_bind only available since PHP 4.1.0<br>\n"; return $sql; } --- 286,290 ---- { if (!$this->_has_mssql_init) { ! ADOConnection::outp( "Parameter: mssql_bind only available since PHP 4.1.0"); return $sql; } *************** *** 302,306 **** if ($this->debug) { ! print "Parameter(\$stmt, \$php_var='$var', \$name='$name'); (type=$type)<br>\n"; } return mssql_bind($stmt[1], '@'.$name, $var, $type, $isOutput, $isNull, $maxLen); --- 302,306 ---- if ($this->debug) { ! ADOConnection::outp( "Parameter(\$stmt, \$php_var='$var', \$name='$name'); (type=$type)"); } return mssql_bind($stmt[1], '@'.$name, $var, $type, $isOutput, $isNull, $maxLen); *************** *** 376,385 **** function NextRecordSet() { ! if (!mssql_next_result($this->_queryID)) return false; ! $this->_inited = false; $this->bind = false; ! $this->_currentRow = -1; ! $this->Init(); ! return true; } --- 376,385 ---- function NextRecordSet() { ! if (!mssql_next_result($this->_queryID)) return false; ! $this->_inited = false; $this->bind = false; ! $this->_currentRow = -1; ! $this->Init(); ! return true; } Index: adodb-oci8.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-oci8.inc.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** adodb-oci8.inc.php 21 Jul 2002 02:27:35 -0000 1.1.2.3 --- adodb-oci8.inc.php 7 Aug 2002 00:45:27 -0000 1.1.2.4 *************** *** 34,41 **** */ class ADODB_oci8 extends ADOConnection { ! var $databaseType = 'oci8'; var $dataProvider = 'oci8'; ! var $replaceQuote = "''"; // string to use to replace quotes ! var $concat_operator='||'; var $sysDate = "TRUNC(SYSDATE)"; var $sysTimeStamp = 'SYSDATE'; --- 34,41 ---- */ class ADODB_oci8 extends ADOConnection { ! var $databaseType = 'oci8'; var $dataProvider = 'oci8'; ! var $replaceQuote = "''"; // string to use to replace quotes ! var $concat_operator='||'; var $sysDate = "TRUNC(SYSDATE)"; var $sysTimeStamp = 'SYSDATE'; *************** *** 63,70 **** // var $ansiOuter = true; // if oracle9 ! function ADODB_oci8() { $this->_hasOCIFetchStatement = (strnatcmp(PHP_VERSION,'4.2.0')>=0);; ! } --- 63,70 ---- // var $ansiOuter = true; // if oracle9 ! function ADODB_oci8() { $this->_hasOCIFetchStatement = (strnatcmp(PHP_VERSION,'4.2.0')>=0);; ! } *************** *** 80,84 **** d. $conn->connectSID = true; ! $conn->Connect($serveraddress,'scott,'tiger',$SID); --- 80,84 ---- d. $conn->connectSID = true; ! $conn->Connect($serveraddress,'scott,'tiger',$SID); *************** *** 87,110 **** NATSOFT.DOMAIN = (DESCRIPTION = ! (ADDRESS_LIST = ! (ADDRESS = (PROTOCOL = TCP)(HOST = kermit)(PORT = 1523)) ! ) ! (CONNECT_DATA = ! (SERVICE_NAME = natsoft.domain) ! ) ) ! */ ! // returns true or false ! function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$persist=false) ! { ! ! if($argHostname) { // added by Jorma Tuomainen <jorma.tuomainen@ppoy.fi> ! if(strpos($argHostname,":")) { $argHostinfo=explode(":",$argHostname); ! $argHostname=$argHostinfo[0]; ! $argHostport=$argHostinfo[1]; ! } else { ! $argHostport="1521"; } --- 87,110 ---- NATSOFT.DOMAIN = (DESCRIPTION = ! (ADDRESS_LIST = ! (ADDRESS = (PROTOCOL = TCP)(HOST = kermit)(PORT = 1523)) ! ) ! (CONNECT_DATA = ! (SERVICE_NAME = natsoft.domain) ! ) ) ! */ ! // returns true or false ! function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$persist=false) ! { ! ! if($argHostname) { // added by Jorma Tuomainen <jorma.tuomainen@ppoy.fi> ! if(strpos($argHostname,":")) { $argHostinfo=explode(":",$argHostname); ! $argHostname=$argHostinfo[0]; ! $argHostport=$argHostinfo[1]; ! } else { ! $argHostport="1521"; } *************** *** 115,125 **** $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname .")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))"; ! } //if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>"; ! if ($persist)$this->_connectionID = OCIPLogon($argUsername,$argPassword, $argDatabasename); else $this->_connectionID = OCILogon($argUsername,$argPassword, $argDatabasename); ! if ($this->_connectionID === false) return false; if ($this->_initdate) { $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'"); --- 115,125 ---- $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname .")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))"; ! } //if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>"; ! if ($persist)$this->_connectionID = OCIPLogon($argUsername,$argPassword, $argDatabasename); else $this->_connectionID = OCILogon($argUsername,$argPassword, $argDatabasename); ! if ($this->_connectionID === false) return false; if ($this->_initdate) { $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'"); *************** *** 132,141 **** // $vers = OCIServerVersion($this->_connectionID); // if (strpos($vers,'8i') !== false) $this->ansiOuter = true; ! return true; } ! // returns true or false ! function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) { ! return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,true); } --- 132,141 ---- // $vers = OCIServerVersion($this->_connectionID); // if (strpos($vers,'8i') !== false) $this->ansiOuter = true; ! return true; } ! // returns true or false ! function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) { ! return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,true); } *************** *** 169,177 **** } ! function BeginTrans() ! { $this->autoCommit = false; $this->_commit = OCI_DEFAULT; ! return true; } --- 169,177 ---- } ! function BeginTrans() ! { $this->autoCommit = false; $this->_commit = OCI_DEFAULT; ! return true; } *************** *** 179,204 **** { if (!$ok) return $this->RollbackTrans(); ! $ret = OCIcommit($this->_connectionID); ! $this->_commit = OCI_COMMIT_ON_SUCCESS; ! $this->autoCommit = true; ! return $ret; } function RollbackTrans() { ! $ret = OCIrollback($this->_connectionID); $this->_commit = OCI_COMMIT_ON_SUCCESS; ! $this->autoCommit = true; return $ret; } ! function SelectDB($dbName) { ! return false; ! } /* there seems to be a bug in the oracle extension -- always returns ORA-00000 - no error */ ! function ErrorMsg() { $arr = @OCIerror($this->_stmt); --- 179,204 ---- { if (!$ok) return $this->RollbackTrans(); ! $ret = OCIcommit($this->_connectionID); ! $this->_commit = OCI_COMMIT_ON_SUCCESS; ! $this->autoCommit = true; ! return $ret; } function RollbackTrans() { ! $ret = OCIrollback($this->_connectionID); $this->_commit = OCI_COMMIT_ON_SUCCESS; ! $this->autoCommit = true; return $ret; } ! function SelectDB($dbName) { ! return false; ! } /* there seems to be a bug in the oracle extension -- always returns ORA-00000 - no error */ ! function ErrorMsg() { $arr = @OCIerror($this->_stmt); *************** *** 208,214 **** if ($arr === false) return ''; } ! $this->_errorMsg = $arr['message']; ! return $this->_errorMsg; ! } function ErrorNo() --- 208,214 ---- if ($arr === false) return ''; } ! $this->_errorMsg = $arr['message']; ! return $this->_errorMsg; ! } function ErrorNo() *************** *** 221,226 **** if ($arr == false) return ''; } ! return $arr['code']; ! } --- 221,226 ---- if ($arr == false) return ''; } ! return $arr['code']; ! } *************** *** 262,288 **** } else { // Algorithm by Tomas V V Cox, from PEAR DB oci8.php ! ! // Let Oracle return the name of the columns ! $q_fields = "SELECT * FROM ($sql) WHERE NULL = NULL"; ! if (!$result = OCIParse($this->_connectionID, $q_fields)) { ! return false; ! } ! if (!$success = OCIExecute($result, OCI_DEFAULT)) { ! return false; ! } ! $ncols = OCINumCols($result); ! for ( $i = 1; $i <= $ncols; $i++ ) { ! $cols[] = OCIColumnName($result, $i); ! } $result = false; ! $fields = implode(',', $cols); ! $nrows += $offset; $offset += 1; // in Oracle rownum starts at 1 ! $sql = "SELECT $fields FROM". ! "(SELECT rownum as adodb_rownum, $fields FROM". ! " ($sql) WHERE rownum <= $nrows". ! ") WHERE adodb_rownum >= $offset"; if ($secs2cache>0) return $this->CacheExecute($secs2cache, $sql,$inputarr,$arg3); --- 262,288 ---- } else { // Algorithm by Tomas V V Cox, from PEAR DB oci8.php ! ! // Let Oracle return the name of the columns ! $q_fields = "SELECT * FROM ($sql) WHERE NULL = NULL"; ! if (!$result = OCIParse($this->_connectionID, $q_fields)) { ! return false; ! } ! if (!$success = OCIExecute($result, OCI_DEFAULT)) { ! return false; ! } ! $ncols = OCINumCols($result); ! for ( $i = 1; $i <= $ncols; $i++ ) { ! $cols[] = OCIColumnName($result, $i); ! } $result = false; ! $fields = implode(',', $cols); ! $nrows += $offset; $offset += 1; // in Oracle rownum starts at 1 ! $sql = "SELECT $fields FROM". ! "(SELECT rownum as adodb_rownum, $fields FROM". ! " ($sql) WHERE rownum <= $nrows". ! ") WHERE adodb_rownum >= $offset"; if ($secs2cache>0) return $this->CacheExecute($secs2cache, $sql,$inputarr,$arg3); *************** *** 308,319 **** * If you are using CURSOR_SHARING = force, it appears this will case a segfault * under oracle 8.1.7.0. Run: ! * $db->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT'); * before UpdateBlob() then... */ ! function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB',$commit=true) { switch(strtoupper($blobtype)) { ! default: print "<b>UpdateBlob</b>: Unknown blobtype=$blobtype<br>"; return false; case 'BLOB': $type = OCI_B_BLOB; break; case 'CLOB': $type = OCI_B_CLOB; break; --- 308,319 ---- * If you are using CURSOR_SHARING = force, it appears this will case a segfault * under oracle 8.1.7.0. Run: ! * $db->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT'); * before UpdateBlob() then... */ ! function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') { switch(strtoupper($blobtype)) { ! default: ADOConnection::outp("<b>UpdateBlob</b>: Unknown blobtype=$blobtype"); return false; case 'BLOB': $type = OCI_B_BLOB; break; case 'CLOB': $type = OCI_B_CLOB; break; *************** *** 329,332 **** --- 329,333 ---- if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT'); + $commit = $this->autoCommit; if ($commit) $this->BeginTrans(); $rs = ADODB_oci8::Execute($sql,$arr); *************** *** 346,350 **** { switch(strtoupper($blobtype)) { ! default: print "<b>UpdateBlob</b>: Unknown blobtype=$blobtype<br>"; return false; case 'BLOB': $type = OCI_B_BLOB; break; case 'CLOB': $type = OCI_B_CLOB; break; --- 347,351 ---- { switch(strtoupper($blobtype)) { ! default: ADOConnection::outp( "<b>UpdateBlob</b>: Unknown blobtype=$blobtype"); return false; case 'BLOB': $type = OCI_B_BLOB; break; case 'CLOB': $type = OCI_B_CLOB; break; *************** *** 449,453 **** { if ($this->debug) { ! print "Parameter(\$stmt, \$php_var='$var', \$name='$name');<br>\n"; } return $this->Bind($stmt,$var,$maxLen,$type,$name); --- 450,454 ---- { if ($this->debug) { ! ADOConnection::outp( "Parameter(\$stmt, \$php_var='$var', \$name='$name');"); } return $this->Bind($stmt,$var,$maxLen,$type,$name); *************** *** 461,470 **** 2. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); ! $db->execute($prepared_statement, array(1,2,3)); 3. $db->execute('insert into table (a,b,c) values (:a,:b,:c)',array('a'=>1,'b'=>2,'c'=>3)); 4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); ! $db->$bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); $db->execute($stmt); */ --- 462,471 ---- 2. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); ! $db->execute($prepared_statement, array(1,2,3)); 3. $db->execute('insert into table (a,b,c) values (:a,:b,:c)',array('a'=>1,'b'=>2,'c'=>3)); 4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); ! $db->$bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); $db->execute($stmt); */ *************** *** 523,527 **** return $stmt; } ! return false; } --- 524,528 ---- return $stmt; } ! return false; } *************** *** 541,548 **** $sql = "SELECT /*+ RULE */ distinct b.column_name FROM ALL_CONSTRAINTS a ! , ALL_CONS_COLUMNS b WHERE ( UPPER(b.table_name) = ('$table')) ! AND (UPPER(a.table_name) = ('$table') and a.constraint_type = 'P') ! AND (a.constraint_name = b.constraint_name)"; $rs = $this->Execute($sql); if ($rs && !$rs->EOF) { --- 542,549 ---- $sql = "SELECT /*+ RULE */ distinct b.column_name FROM ALL_CONSTRAINTS a ! , ALL_CONS_COLUMNS b WHERE ( UPPER(b.table_name) = ('$table')) ! AND (UPPER(a.table_name) = ('$table') and a.constraint_type = 'P') ! AND (a.constraint_name = b.constraint_name)"; $rs = $this->Execute($sql); if ($rs && !$rs->EOF) { *************** *** 629,644 **** /*-------------------------------------------------------------------------------------- ! Class Name: Recordset --------------------------------------------------------------------------------------*/ class ADORecordset_oci8 extends ADORecordSet { ! var $databaseType = 'oci8'; var $bind=false; var $_fieldobjs; //var $_arr = false; ! function ADORecordset_oci8($queryID) ! { global $ADODB_FETCH_MODE; --- 630,645 ---- /*-------------------------------------------------------------------------------------- ! Class Name: Recordset --------------------------------------------------------------------------------------*/ class ADORecordset_oci8 extends ADORecordSet { ! var $databaseType = 'oci8'; var $bind=false; var $_fieldobjs; //var $_arr = false; ! function ADORecordset_oci8($queryID) ! { global $ADODB_FETCH_MODE; *************** *** 652,656 **** } $this->_queryID = $queryID; ! } --- 653,657 ---- } $this->_queryID = $queryID; ! } *************** *** 678,684 **** function _initrs() ! { ! $this->_numOfRows = -1; ! $this->_numOfFields = OCInumcols($this->_queryID); if ($this->_numOfFields>0) { $this->_fieldobjs = array(); --- 679,685 ---- function _initrs() ! { ! $this->_numOfRows = -1; ! $this->_numOfFields = OCInumcols($this->_queryID); if ($this->_numOfFields>0) { $this->_fieldobjs = array(); *************** *** 686,695 **** for ($i=0;$i<$max; $i++) $this->_fieldobjs[] = $this->_FetchField($i); } ! } ! /* Returns: an object containing field information. ! Get column information in the Recordset object. fetchField() can be used in order to obtain information about ! fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by ! fetchField() is retrieved. */ function &_FetchField($fieldOffset = -1) --- 687,696 ---- for ($i=0;$i<$max; $i++) $this->_fieldobjs[] = $this->_FetchField($i); } ! } ! /* Returns: an object containing field information. ! Get column information in the Recordset object. fetchField() can be used in order to obtain information about ! fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by ! fetchField() is retrieved. */ function &_FetchField($fieldOffset = -1) *************** *** 697,703 **** $fld = new ADOFieldObject; $fieldOffset += 1; ! $fld->name =OCIcolumnname($this->_queryID, $fieldOffset); ! $fld->type = OCIcolumntype($this->_queryID, $fieldOffset); ! $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset); if ($fld->type == 'NUMBER') { //$p = OCIColumnPrecision($this->_queryID, $fieldOffset); --- 698,704 ---- $fld = new ADOFieldObject; $fieldOffset += 1; ! $fld->name =OCIcolumnname($this->_queryID, $fieldOffset); ! $fld->type = OCIcolumntype($this->_queryID, $fieldOffset); ! $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset); if ($fld->type == 'NUMBER') { //$p = OCIColumnPrecision($this->_queryID, $fieldOffset); *************** *** 705,709 **** if ($sc == 0) $fld->type = 'INT'; } ! return $fld; } --- 706,710 ---- if ($sc == 0) $fld->type = 'INT'; } ! return $fld; } *************** *** 781,808 **** ! function _seek($row) ! { ! return false; ! } ! function _fetch() { return @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode); ! } ! /* close() only needs to be called if you are worried about using too much memory while your script ! is running. All associated result memory for the specified result identifier will automatically be freed. */ ! function _close() { ! OCIFreeStatement($this->_queryID); $this->_queryID = false; ! } ! function MetaType($t,$len=-1) ! { switch (strtoupper($t)) { ! case 'VARCHAR': ! case 'VARCHAR2': case 'CHAR': case 'VARBINARY': --- 782,809 ---- ! function _seek($row) ! { ! return false; ! } ! function _fetch() { return @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode); ! } ! /* close() only needs to be called if you are worried about using too much memory while your script ! is running. All associated result memory for the specified result identifier will automatically be freed. */ ! function _close() { ! OCIFreeStatement($this->_queryID); $this->_queryID = false; ! } ! function MetaType($t,$len=-1) ! { switch (strtoupper($t)) { ! case 'VARCHAR': ! case 'VARCHAR2': case 'CHAR': case 'VARBINARY': *************** *** 810,817 **** case 'NCHAR': case 'NVARCHAR': ! if ($len <= $this->blobSize) return 'C'; case 'NCLOB': ! case 'LONG': case 'LONG VARCHAR': case 'CLOB'; --- 811,818 ---- case 'NCHAR': case 'NVARCHAR': ! if ($len <= $this->blobSize) return 'C'; case 'NCLOB': ! case 'LONG': case 'LONG VARCHAR': case 'CLOB'; *************** *** 826,830 **** return 'D'; ! //case 'T': return 'T'; case 'INT': --- 827,831 ---- return 'D'; ! //case 'T': return 'T'; case 'INT': *************** *** 833,839 **** return 'I'; ! default: return 'N'; ! } ! } } ?> --- 834,840 ---- return 'I'; ! default: return 'N'; ! } ! } } ?> Index: adodb-oci805.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-oci805.inc.php,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** adodb-oci805.inc.php 21 Jul 2002 02:27:35 -0000 1.2.2.2 --- adodb-oci805.inc.php 7 Aug 2002 00:45:27 -0000 1.2.2.3 *************** *** 1,5 **** <?php /** ! * @version V2.21 19 July 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /** ! * @version V2.30 1 Aug 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, *************** *** 22,26 **** { $this->ADODB_oci8(); ! } function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$arg3=false,$secs2cache=0) --- 22,26 ---- { $this->ADODB_oci8(); ! } function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$arg3=false,$secs2cache=0) Index: adodb-postgres64.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-postgres64.inc.php,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** adodb-postgres64.inc.php 21 Jul 2002 02:27:35 -0000 1.2.2.2 --- adodb-postgres64.inc.php 7 Aug 2002 00:45:27 -0000 1.2.2.3 *************** *** 10,15 **** 08 Nov 2000 jlim - Minor corrections, removing mysql stuff 09 Nov 2000 jlim - added insertid support suggested by "Christopher Kings-Lynne" <chriskl@familyhealth.com.au> ! jlim - changed concat operator to || and data types to MetaType to match documented pgsql types ! see http://www.postgresql.org/devel-corner/docs/postgres/datatype.htm 22 Nov 2000 jlim - added changes to FetchField() and MetaTables() contributed by "raser" <raser@mail.zen.com.tw> 27 Nov 2000 jlim - added changes to _connect/_pconnect from ideas by "Lennie" <leen@wirehub.nl> --- 10,15 ---- 08 Nov 2000 jlim - Minor corrections, removing mysql stuff 09 Nov 2000 jlim - added insertid support suggested by "Christopher Kings-Lynne" <chriskl@familyhealth.com.au> ! jlim - changed concat operator to || and data types to MetaType to match documented pgsql types ! see http://www.postgresql.org/devel-corner/docs/postgres/datatype.htm 22 Nov 2000 jlim - added changes to FetchField() and MetaTables() contributed by "raser" <raser@mail.zen.com.tw> 27 Nov 2000 jlim - added changes to _connect/_pconnect from ideas by "Lennie" <leen@wirehub.nl> *************** *** 22,27 **** var $databaseType = 'postgres64'; var $dataProvider = 'postgres'; ! var $hasInsertID = true; ! var $_resultid = false; var $concat_operator='||'; var $metaTablesSQL = "select tablename from pg_tables where tablename not like 'pg_%' order by 1"; --- 22,27 ---- var $databaseType = 'postgres64'; var $dataProvider = 'postgres'; ! var $hasInsertID = true; ! var $_resultid = false; var $concat_operator='||'; var $metaTablesSQL = "select tablename from pg_tables where tablename not like 'pg_%' order by 1"; *************** *** 87,94 **** Unless you are very careful, you might end up with a tuple having a different OID if a database must be reloaded. */ ! function _insertid() ! { ! return pg_getlastoid($this->_resultid); ! } // I get this error with PHP before 4.0.6 - jlim --- 87,94 ---- Unless you are very careful, you might end up with a tuple having a different OID if a database must be reloaded. */ ! function _insertid() ! { ! return pg_getlastoid($this->_resultid); ! } // I get this error with PHP before 4.0.6 - jlim *************** *** 96,100 **** function _affectedrows() { ! return pg_cmdtuples($this->_resultid); } --- 96,100 ---- function _affectedrows() { ! return pg_cmdtuples($this->_resultid); } *************** *** 168,172 **** // converts field names to lowercase ! function &MetaColumns($table) { global $ADODB_FETCH_MODE; --- 168,172 ---- // converts field names to lowercase ! function &MetaColumns($table) { global $ADODB_FETCH_MODE; *************** *** 218,222 **** } } else { ! print "==> SQL => " . $sql . "\n"; } unset($rsdef); --- 218,222 ---- } } else { ! ADOConnection::outp( "==> SQL => " . $sql); } unset($rsdef); *************** *** 269,275 **** $arr = array(); $sql="select datname from pg_database"; ! $rs = $this->Execute($sql); if (!$rs) return false; ! while (!$rs->EOF) { $arr[] = $rs->fields[0]; $rs->MoveNext(); --- 269,275 ---- $arr = array(); $sql="select datname from pg_database"; ! $rs = $this->Execute($sql); if (!$rs) return false; ! while (!$rs->EOF) { $arr[] = $rs->fields[0]; $rs->MoveNext(); *************** *** 286,292 **** // $db->Connect('host1','user1','secret'); function _connect($str,$user='',$pwd='',$db='') ! { if ($user || $pwd || $db) { ! if ($str) { $host = split(":", $str); if ($host[0]) $str = "host=$host[0]"; --- 286,292 ---- // $db->Connect('host1','user1','secret'); function _connect($str,$user='',$pwd='',$db='') ! { if ($user || $pwd || $db) { ! if ($str) { $host = split(":", $str); if ($host[0]) $str = "host=$host[0]"; *************** *** 294,299 **** if (isset($host[1])) $str .= " port=$host[1]"; } ! if ($user) $str .= " user=".$user; ! if ($pwd) $str .= " password=".$pwd; if ($db) $str .= " dbname=".$db; } --- 294,299 ---- if (isset($host[1])) $str .= " port=$host[1]"; } ! if ($user) $str .= " user=".$user; ! if ($pwd) $str .= " password=".$pwd; if ($db) $str .= " dbname=".$db; } *************** *** 303,307 **** if ($this->_connectionID === false) return false; $this->Execute("set datestyle='ISO'"); ! return true; } --- 303,307 ---- if ($this->_connectionID === false) return false; $this->Execute("set datestyle='ISO'"); ! return true; } *************** *** 314,318 **** { if ($user || $pwd || $db) { ! if ($str) { $host = split(":", $str); if ($host[0]) $str = "host=$host[0]"; --- 314,318 ---- { if ($user || $pwd || $db) { ! if ($str) { $host = split(":", $str); if ($host[0]) $str = "host=$host[0]"; *************** *** 320,325 **** if (isset($host[1])) $str .= " port=$host[1]"; } ! if ($user) $str .= " user=".$user; ! if ($pwd) $str .= " password=".$pwd; if ($db) $str .= " dbname=".$db; }//print $str; --- 320,325 ---- if (isset($host[1])) $str .= " port=$host[1]"; } ! if ($user) $str .= " user=".$user; ! if ($pwd) $str .= " password=".$pwd; if ($db) $str .= " dbname=".$db; }//print $str; *************** *** 333,338 **** function _query($sql,$inputarr) { ! $this->_resultid= pg_Exec($this->_connectionID,$sql); ! return $this->_resultid; } --- 333,338 ---- function _query($sql,$inputarr) { ! $this->_resultid= pg_Exec($this->_connectionID,$sql); ! return $this->_resultid; } *************** *** 343,347 **** if (empty($this->_connectionID)) $this->_errorMsg = @pg_errormessage(); else $this->_errorMsg = @pg_errormessage($this->_connectionID); ! return $this->_errorMsg; } --- 343,347 ---- if (empty($this->_connectionID)) $this->_errorMsg = @pg_errormessage(); else $this->_errorMsg = @pg_errormessage($this->_connectionID); ! return $this->_errorMsg; } *************** *** 492,541 **** { switch (strtoupper($t)) { ! case 'CHAR': ! case 'CHARACTER': ! case 'VARCHAR': ! case 'NAME': case 'BPCHAR': ! if ($len <= $this->blobSize) return 'C'; ! case 'TEXT': ! return 'X'; ! case 'IMAGE': // user defined type ! case 'BLOB': // user defined type ! case 'BIT': // This is a bit string, not a single bit, so don't return 'L' ! case 'VARBIT': ! case 'BYTEA': ! return 'B'; ! ! case 'BOOL': ! case 'BOOLEAN': ! return 'L'; ! case 'DATE': ! return 'D'; ! ! case 'TIME': ! case 'DATETIME': ! case 'TIMESTAMP': case 'TIMESTAMPTZ': ! return 'T'; ! ! case 'SMALLINT': ! case 'BIGINT': ! case 'INTEGER': ! case 'INT8': ! case 'INT4': ! case 'INT2': ! if (isset($fieldobj) && empty($fieldobj->primary_key) && empty($fieldobj->unique)) return 'I'; ! case 'OID': ! case 'SERIAL': ! return 'R'; ! default: ! return 'N'; ! } } --- 492,541 ---- { switch (strtoupper($t)) { ! case 'CHAR': ! case 'CHARACTER': ! case 'VARCHAR': ! case 'NAME': case 'BPCHAR': ! if ($len <= $this->blobSize) return 'C'; ! case 'TEXT': ! return 'X'; ! case 'IMAGE': // user defined type ! case 'BLOB': // user defined type ! case 'BIT': // This is a bit string, not a single bit, so don't return 'L' ! case 'VARBIT': ! case 'BYTEA': ! return 'B'; ! case 'BOOL': ! case 'BOOLEAN': ! return 'L'; ! ! case 'DATE': ! return 'D'; ! ! case 'TIME': ! case 'DATETIME': ! case 'TIMESTAMP': case 'TIMESTAMPTZ': ! return 'T'; ! ! case 'SMALLINT': ! case 'BIGINT': ! case 'INTEGER': ! case 'INT8': ! case 'INT4': ! case 'INT2': ! if (isset($fieldobj) && empty($fieldobj->primary_key) && empty($fieldobj->unique)) return 'I'; ! case 'OID': ! case 'SERIAL': ! return 'R'; ! default: ! return 'N'; ! } } Index: adodb-sqlanywhere.inc.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/pnadodb/drivers/adodb-sqlanywhere.inc.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** adodb-sqlanywhere.inc.php 21 Jul 2002 02:27:35 -0000 1.1.2.3 --- adodb-sqlanywhere.inc.php 7 Aug 2002 00:45:27 -0000 1.1.2.4 *************** *** 1,5 **** <?php /* ! version V2.21 19 July 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved. Released under both BSD license and Lesser GPL library license. --- 1,5 ---- <?php /* ! version V2.30 1 Aug 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved. Released under both BSD license and Lesser GPL library license. *************** *** 11,40 **** 21.02.2002 - Wade Johnson wade@wadejohnson.de ! Extended ODBC class for Sybase SQLAnywhere. 1) Added support to retrieve the last row insert ID on tables with ! primary key column using autoincrement function. 2) Added blob support. Usage: ! a) create blob variable on db server: ! $dbconn->create_blobvar($blobVarName); ! b) load blob var from file. $filename must be complete path ! $dbcon->load_blobvar_from_file($blobVarName, $filename); ! c) Use the $blobVarName in SQL insert or update statement in the values ! clause: ! $recordSet = $dbconn->Execute('INSERT INTO tabname (idcol, blobcol) ' ! . ! 'VALUES (\'test\', ' . $blobVarName . ')'); ! instead of loading blob from a file, you can also load from ! an unformatted (raw) blob variable: ! $dbcon->load_blobvar_from_var($blobVarName, $varName); ! d) drop blob variable on db server to free
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |