"TYPO3 4.0.1: ADOConnection Class Reference", "datetime" => "Sat Dec 2 19:22:35 2006", "date" => "2 Dec 2006", "doxygenversion" => "1.4.6", "projectname" => "TYPO3 4.0.1", "projectnumber" => "4.0.1" ); get_header($doxygen_vars); ?>
Public Member Functions | |
ADOConnection () | |
Version () | |
ServerInfo () | |
IsConnected () | |
_findvers ($str) | |
outp ($msg, $newline=true) | |
Time () | |
Connect ($argHostname="", $argUsername="", $argPassword="", $argDatabaseName="", $forceNew=false) | |
_nconnect ($argHostname, $argUsername, $argPassword, $argDatabaseName) | |
NConnect ($argHostname="", $argUsername="", $argPassword="", $argDatabaseName="") | |
PConnect ($argHostname="", $argUsername="", $argPassword="", $argDatabaseName="") | |
SQLDate ($fmt, $col=false) | |
Prepare ($sql) | |
PrepareSP ($sql, $param=true) | |
Quote ($s) | |
QMagic ($s) | |
q (&$s) | |
ErrorNative () | |
nextId ($seq_name) | |
RowLock ($table, $where) | |
CommitLock ($table) | |
RollbackLock ($table) | |
SetFetchMode ($mode) | |
& | Query ($sql, $inputarr=false) |
& | LimitQuery ($sql, $offset, $count, $params=false) |
Disconnect () | |
Param ($name, $type='C') | |
InParameter (&$stmt, &$var, $name, $maxLen=4000, $type=false) | |
OutParameter (&$stmt, &$var, $name, $maxLen=4000, $type=false) | |
Parameter (&$stmt, &$var, $name, $isOutput=false, $maxLen=4000, $type=false) | |
StartTrans ($errfn= 'ADODB_TransMonitor') | |
CompleteTrans ($autoComplete=true) | |
FailTrans () | |
HasFailedTrans () | |
& | Execute ($sql, $inputarr=false) |
& | _Execute ($sql, $inputarr=false) |
CreateSequence ($seqname='adodbseq', $startID=1) | |
DropSequence ($seqname='adodbseq') | |
GenID ($seqname='adodbseq', $startID=1) | |
Insert_ID ($table='', $column='') | |
PO_Insert_ID ($table="", $id="") | |
Affected_Rows () | |
ErrorMsg () | |
ErrorNo () | |
MetaError ($err=false) | |
MetaErrorMsg ($errno) | |
MetaPrimaryKeys ($table, $owner=false) | |
MetaForeignKeys ($table, $owner=false, $upper=false) | |
SelectDB ($dbName) | |
& | SelectLimit ($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs2cache=0) |
& | SerializableRS (&$rs) |
& | _rs2rs (&$rs, $nrows=-1, $offset=-1, $close=true) |
& | GetAll ($sql, $inputarr=false) |
& | GetAssoc ($sql, $inputarr=false, $force_array=false, $first2cols=false) |
& | CacheGetAssoc ($secs2cache, $sql=false, $inputarr=false, $force_array=false, $first2cols=false) |
GetOne ($sql, $inputarr=false) | |
CacheGetOne ($secs2cache, $sql=false, $inputarr=false) | |
GetCol ($sql, $inputarr=false, $trim=false) | |
CacheGetCol ($secs, $sql=false, $inputarr=false, $trim=false) | |
OffsetDate ($dayFraction, $date=false) | |
& | GetArray ($sql, $inputarr=false) |
& | CacheGetAll ($secs2cache, $sql=false, $inputarr=false) |
& | CacheGetArray ($secs2cache, $sql=false, $inputarr=false) |
& | GetRow ($sql, $inputarr=false) |
& | CacheGetRow ($secs2cache, $sql=false, $inputarr=false) |
Replace ($table, $fieldArray, $keyCol, $autoQuote=false, $has_autoinc=false) | |
& | CacheSelectLimit ($secs2cache, $sql, $nrows=-1, $offset=-1, $inputarr=false) |
CacheFlush ($sql=false, $inputarr=false) | |
_dirFlush ($dir, $kill_top_level=false) | |
xCacheFlush ($sql=false, $inputarr=false) | |
_gencachename ($sql, $createdir) | |
& | CacheExecute ($secs2cache, $sql=false, $inputarr=false) |
& | AutoExecute ($table, $fields_values, $mode= 'INSERT', $where=FALSE, $forceUpdate=true, $magicq=false) |
GetUpdateSQL (&$rs, $arrFields, $forceUpdate=false, $magicq=false, $force=null) | |
GetInsertSQL (&$rs, $arrFields, $magicq=false, $force=null) | |
UpdateBlob ($table, $column, $val, $where, $blobtype='BLOB') | |
UpdateBlobFile ($table, $column, $path, $where, $blobtype='BLOB') | |
BlobDecode ($blob) | |
BlobEncode ($blob) | |
SetCharSet ($charset) | |
IfNull ($field, $ifNull) | |
LogSQL ($enable=true) | |
GetCharSet () | |
UpdateClob ($table, $column, $val, $where) | |
MetaType ($t, $len=-1, $fieldobj=false) | |
SetDateLocale ($locale= 'En') | |
& | GetActiveRecordsClass ($class, $table, $whereOrderBy=false, $bindarr=false, $primkeyArr=false) |
& | GetActiveRecords ($table, $where=false, $bindarr=false, $primkeyArr=false) |
Close () | |
BeginTrans () | |
SetTransactionMode ($transaction_mode) | |
MetaTransaction ($mode, $db) | |
CommitTrans ($ok=true) | |
RollbackTrans () | |
MetaDatabases () | |
& | MetaTables ($ttype=false, $showSchema=false, $mask=false) |
_findschema (&$table, &$schema) | |
& | MetaColumns ($table, $normalize=true) |
& | MetaIndexes ($table, $primary=false, $owner=false) |
& | MetaColumnNames ($table, $numIndexes=false, $useattnum=false) |
Concat () | |
DBDate ($d) | |
BindDate ($d) | |
BindTimeStamp ($d) | |
DBTimeStamp ($ts) | |
UnixDate ($v) | |
UnixTimeStamp ($v) | |
UserDate ($v, $fmt='Y-m-d', $gmt=false) | |
UserTimeStamp ($v, $fmt='Y-m-d H:i:s', $gmt=false) | |
escape ($s, $magic_quotes=false) | |
addq ($s, $magic_quotes=false) | |
qstr ($s, $magic_quotes=false) | |
& | PageExecute ($sql, $nrows, $page, $inputarr=false, $secs2cache=0) |
& | CachePageExecute ($secs2cache, $sql, $nrows, $page, $inputarr=false) |
Public Attributes | |
$dataProvider = 'native' | |
$databaseType = '' | |
$database = '' | |
RDBMS currently in use, eg. odbc, mysql, mssql. | |
$host = '' | |
Name of database to be used. | |
$user = '' | |
The hostname of the database server. | |
$password = '' | |
The username which is used to connect to the database server. | |
$debug = false | |
Password for the username. For security, we no longer store it. | |
$maxblobsize = 262144 | |
if set to true will output sql statements | |
$concat_operator = '+' | |
maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro | |
$substr = 'substr' | |
default concat operator -- change to || for Oracle/Interbase | |
$length = 'length' | |
substring operator | |
$random = 'rand()' | |
string length ofperator | |
$upperCase = 'upper' | |
random function | |
$fmtDate = "'Y-m-d'" | |
uppercase function | |
$fmtTimeStamp = "'Y-m-d, h:i:s A'" | |
used by DBDate() as the default date format used by the database | |
$true = '1' | |
used by DBTimeStamp as the default timestamp fmt. | |
$false = '0' | |
string that represents TRUE for a database | |
$replaceQuote = "\\'" | |
string that represents FALSE for a database | |
$nameQuote = '"' | |
string to use to replace quotes | |
$charSet = false | |
string to use to quote identifiers and names | |
$metaDatabasesSQL = '' | |
character set to use - only for interbase, postgres and oci8 | |
$metaTablesSQL = '' | |
$uniqueOrderBy = false | |
$emptyDate = ' ' | |
All order by columns have to be unique. | |
$emptyTimeStamp = ' ' | |
$lastInsID = false | |
$hasInsertID = false | |
$hasAffectedRows = false | |
supports autoincrement ID? | |
$hasTop = false | |
supports affected rows for update/delete? | |
$hasLimit = false | |
support mssql/access SELECT TOP 10 * FROM TABLE | |
$readOnly = false | |
support pgsql/mysql SELECT * FROM TABLE LIMIT 10 | |
$hasMoveFirst = false | |
this is a readonly database - used by phpLens | |
$hasGenID = false | |
has ability to run MoveFirst(), scrolling backwards | |
$hasTransactions = true | |
can generate sequences using GenID(); | |
$genID = 0 | |
has transactions | |
$raiseErrorFn = false | |
sequence id used by GenID(); | |
$isoDates = false | |
error function to call | |
$cacheSecs = 3600 | |
accepts dates in ISO format | |
$sysDate = false | |
cache for 1 hour | |
$sysTimeStamp = false | |
name of function that returns the current date | |
$arrayClass = 'ADORecordSet_array' | |
name of function that returns the current timestamp | |
$noNullStrings = false | |
name of class used to generate array recordsets, which are pre-downloaded recordsets | |
$numCacheHits = 0 | |
oracle specific stuff - if true ensures that '' is converted to ' ' | |
$numCacheMisses = 0 | |
$pageExecuteCountRows = true | |
$uniqueSort = false | |
$leftOuter = false | |
indicates that all fields in order by must be unique | |
$rightOuter = false | |
operator to use for left outer join in WHERE clause | |
$ansiOuter = false | |
operator to use for right outer join in WHERE clause | |
$autoRollback = false | |
whether ansi outer join syntax supported | |
$poorAffectedRows = false | |
$fnExecute = false | |
$fnCacheExecute = false | |
$blobEncodeType = false | |
$rsPrefix = "ADORecordSet_" | |
$autoCommit = true | |
$transOff = 0 | |
do not modify this yourself - actually private | |
$transCnt = 0 | |
temporarily disable transactions | |
$fetchMode = false | |
count of nested transactions | |
$_oldRaiseFn = false | |
$_transOK = null | |
$_connectionID = false | |
$_errorMsg = false | |
The returned link identifier whenever a successful database connection is made. | |
$_errorCode = false | |
then returned by the errorMsg() function | |
$_queryID = false | |
Last error code, not guaranteed to be used - only by oci8. | |
$_isPersistentConnection = false | |
This variable keeps the last created result link identifier. | |
$_bindInputArray = false | |
A boolean variable to state whether its a persistent connection or normal connection. */. | |
$_evalAll = false | |
set to true if ADOConnection.Execute() permits binding of array parameters. | |
$_affected = false | |
$_logsql = false | |
$_transmode = '' |
Definition at line 232 of file adodb.inc.php.
|
Constructor Definition at line 322 of file adodb.inc.php. |
|
Private function to erase all of the files and subdirectories in a directory. Just specify the directory, and tell it if you want to delete the directory or just clear it out. Note: $kill_top_level is used internally in the function to flush subdirectories. Definition at line 1551 of file adodb.inc.php. |
|
Private function to generate filename for caching. Filename is generated based on:
When not in safe mode, we create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). Assuming that we can have 50,000 files per directory with good performance, then we can scale to 12.8 million unique cached recordsets. Wow! Definition at line 1611 of file adodb.inc.php. References outp(). |
|
Convert database recordset to an array recordset input recordset's cursor should be at beginning, and old $rs will be closed.
Definition at line 1189 of file adodb.inc.php. References $false. Referenced by _Execute(), SelectLimit(), and SerializableRS(). |
|
Quotes a string, without prefixing nor appending quotes. Definition at line 2466 of file adodb.inc.php. |
|
Definition at line 1000 of file adodb.inc.php. References outp(). |
|
Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
Reimplemented in ADODB_access, ADODB_ado, ADODB_ado, ADODB_ado_access, ADODB_borland_ibase, ADODB_db2, ADODB_ibase, ADODB_mysql, ADODB_mysqlt, ADODB_oci8, ADODB_odbc, ADODB_odbtp, ADODB_oracle, ADODB_pdo, ADODB_postgres64, ADODB_sqlite, ADODB_sybase, and ADODB_vfp. Definition at line 2023 of file adodb.inc.php. Referenced by StartTrans(). |
|
Execute SQL, caching recordsets.
Definition at line 1646 of file adodb.inc.php. References outp(). Referenced by ADODB_sqlite::SelectLimit(), ADODB_postgres7::SelectLimit(), ADODB_pdo_pgsql::SelectLimit(), ADODB_pdo_mysql::SelectLimit(), ADODB_firebird::SelectLimit(), ADODB_borland_ibase::SelectLimit(), and SelectLimit(). |
|
Flush cached recordsets that match a particular $sql statement. If $sql == false, then we purge all files in the cache. Definition at line 1517 of file adodb.inc.php. References outp(). |
|
Will select the supplied $page number from a recordset, given that it is paginated in pages of $nrows rows per page. It also saves two boolean values saying if the given page is the first and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
Definition at line 2563 of file adodb.inc.php. |
|
Will select, getting rows from $offset (1-based), for $nrows. This simulates the MySQL "select * from table limit $offset,$nrows" , and the PostgreSQL "select * from table limit $nrows offset $offset". Note that MySQL and PostgreSQL parameter ordering is the opposite of the other. eg. CacheSelectLimit(15,'select * from table',3); will return rows 1 to 3 (1-based) CacheSelectLimit(15,'select * from table',3,2); will return rows 3 to 5 (1-based) BUG: Currently CacheSelectLimit fails with $sql with LIMIT or TOP clause already set
Definition at line 1493 of file adodb.inc.php. References outp(). |
|
Close Connection Definition at line 2011 of file adodb.inc.php. Referenced by Disconnect(). |
|
If database does not support transactions, always return true as data always commited
Reimplemented in ADODB_ado, ADODB_ado, ADODB_db2, ADODB_ibase, ADODB_mysqlt, ADODB_oci8, ADODB_odbc, ADODB_odbtp, ADODB_oracle, ADODB_pdo, ADODB_postgres64, ADODB_sqlite, and ADODB_sybase. Definition at line 2084 of file adodb.inc.php. Referenced by CommitLock(), and CompleteTrans(). |
|
Used together with StartTrans() to end a transaction. Monitors connection for sql errors, and will commit or rollback as appropriate. if true, monitor sql errors and commit and rollback as appropriate, and if set to false force rollback even if no SQL error detected.
Definition at line 737 of file adodb.inc.php. References CommitTrans(), outp(), and RollbackTrans(). |
|
Different SQL databases used different methods to combine strings together. This function provides a wrapper. param s variable number of string parameters Usage: $db->Concat($str1,$str2);
Reimplemented in ADODB_fbsql, and ADODB_mysql. Definition at line 2299 of file adodb.inc.php. |
|
Connect to database
Definition at line 403 of file adodb.inc.php. References _nconnect(), ErrorMsg(), ErrorNo(), and outp(). Referenced by NConnect(), and PConnect(). |
|
Converts a date "d" to a string that the database can understand.
Reimplemented in ADODB_oci8, and ADODB_oracle. Definition at line 2313 of file adodb.inc.php. References UnixDate(). Referenced by ADODB_oracle::BindDate(), and ADODB_oci8::BindDate(). |
|
Converts a timestamp "ts" to a string that the database can understand.
Reimplemented in ADODB_oci8, and ADODB_oracle. Definition at line 2350 of file adodb.inc.php. References UnixTimeStamp(). Referenced by ADODB_oracle::BindTimeStamp(), and ADODB_oci8::BindTimeStamp(). |
|
PEAR DB Compat - do not use internally Definition at line 647 of file adodb.inc.php. References Close(). |
|
Reimplemented in ADODB_ado, ADODB_ado, ADODB_csv, ADODB_db2, ADODB_fbsql, ADODB_ibase, ADODB_mysql, ADODB_oci8, ADODB_odbc, ADODB_odbtp, ADODB_oracle, ADODB_pdo, ADODB_postgres64, ADODB_sqlite, ADODB_sybase, and ADODB_sybase_ase. Definition at line 1018 of file adodb.inc.php. Referenced by _Execute(), Connect(), ADODB_odbc::ErrorMsg(), ADODB_db2::ErrorMsg(), and PConnect(). |
|
PEAR DB Compat - do not use internally. Definition at line 564 of file adodb.inc.php. References ErrorNo(). |
|
Reimplemented in ADODB_ado, ADODB_ado, ADODB_csv, ADODB_db2, ADODB_fbsql, ADODB_ibase, ADODB_mysql, ADODB_oci8, ADODB_odbc, ADODB_odbtp, ADODB_oracle, ADODB_pdo, ADODB_postgres64, and ADODB_sqlite. Definition at line 1028 of file adodb.inc.php. Referenced by _Execute(), Connect(), ErrorNative(), ADODB_odbc::ErrorNo(), ADODB_db2::ErrorNo(), MetaError(), and PConnect(). |
|
|
Generates a sequence id and stores it in $this->genID; GenID is only available if $this->hasGenID = true;
Reimplemented in ADODB_ado_mssql, ADODB_db2, ADODB_ibase, ADODB_mysql, ADODB_odbc, ADODB_odbtp, and ADODB_sqlite. Definition at line 937 of file adodb.inc.php. References Execute(). Referenced by nextId(). |
|
Definition at line 1357 of file adodb.inc.php. Referenced by ADODB_odbc_mssql::MetaForeignKeys(), ADODB_sybase_ase::MetaTables(), and ADODB_odbtp::MetaTables(). |
|
Generates an Insert Query based on an existing recordset. $arrFields is an associative array of fields with the value that should be assigned. Note: This function should only be used on a recordset that is run against a single table. Definition at line 1807 of file adodb.inc.php. |
|
Return first element of first row of sql statement. Recordset is disposed for you.
Reimplemented in ADODB_mysql. Definition at line 1267 of file adodb.inc.php. Referenced by ADODB_sybase::_affectedrows(), ADODB_ado_mssql::_affectedrows(), ADODB_sybase::_insertid(), ADODB_sqlanywhere::_insertid(), ADODB_SAPDB::_insertid(), ADODB_postgres64::_insertid(), ADODB_odbtp::_insertid(), ADODB_odbc_mssql::_insertid(), ADODB_ODBC_DB2::_insertid(), ADODB_mysql::_insertid(), ADODB_db2::_insertid(), ADODB_ado_mssql::_insertid(), ADODB_odbtp::CreateSequence(), ADODB_sqlite::GenID(), ADODB_odbtp::GenID(), ADODB_odbc::GenID(), ADODB_ado_mssql::GenID(), ADODB_mysql::GetOne(), PO_Insert_ID(), ADODB_sybase::RowLock(), ADODB_postgres64::RowLock(), ADODB_ODBC_DB2::RowLock(), ADODB_oci8::RowLock(), ADODB_postgres64::ServerInfo(), ADODB_pdo_pgsql::ServerInfo(), ADODB_pdo_mysql::ServerInfo(), ADODB_ODBC_DB2::ServerInfo(), ADODB_oci8::ServerInfo(), and ADODB_mysql::ServerInfo(). |
|
Return one row of sql statement. Recordset is disposed for you.
Definition at line 1413 of file adodb.inc.php. Referenced by ADODB_odbc_mssql::ServerInfo(). |
|
Generates an Update Query based on an existing recordset. $arrFields is an associative array of fields with the value that should be assigned. Note: This function should only be used on a recordset that is run against a single table and sql should only be a simple select stmt with no groupby/orderby/limit "Jonathan Younger" <jyounger@unilab.com> Definition at line 1782 of file adodb.inc.php. |
|
Check if transaction has failed, only for Smart Transactions. Definition at line 779 of file adodb.inc.php. |
|
Definition at line 970 of file adodb.inc.php. References outp(). Referenced by PO_Insert_ID(). |
|
PEAR DB Compat - do not use internally Definition at line 636 of file adodb.inc.php. References SelectLimit(). |
|
List columns names in a table as an array.
Definition at line 2267 of file adodb.inc.php. |
|
List columns in a database as an array of ADOFieldObjects. See top of file for definition of object.
Reimplemented in ADODB_netezza, ADODB_odbtp, ADODB_pdo, ADODB_pdo_pgsql, and ADODB_sybase_ase. Definition at line 2196 of file adodb.inc.php. Referenced by ADODB_odbc_mssql::MetaColumns(), and MetaPrimaryKeys(). |
|
return the databases that the driver can connect to. Some databases will return an empty array.
Reimplemented in ADODB_csv, ADODB_fbsql, ADODB_mysql, and ADODB_sybase_ase. Definition at line 2103 of file adodb.inc.php. |
|
Reimplemented in ADODB_odbc_mssql, ADODB_odbtp, and ADODB_postgres7. Definition at line 1069 of file adodb.inc.php. |
|
List indexes on a table as an array.
Reimplemented in ADODB_ibase, ADODB_mysql, ADODB_oci8, ADODB_ODBC_DB2, and ADODB_sqlite. Definition at line 2255 of file adodb.inc.php. |
|
Reimplemented in ADODB_odbtp. Definition at line 1049 of file adodb.inc.php. References MetaColumns(). |
|
Reimplemented in ADODB_mysql, ADODB_oci8, ADODB_odbc_mssql, ADODB_odbtp, ADODB_pdo, ADODB_pdo_mysql, ADODB_pdo_oci, ADODB_pdo_pgsql, ADODB_postgres64, and ADODB_sybase_ase. Definition at line 2134 of file adodb.inc.php. Referenced by ADODB_postgres64::MetaTables(), ADODB_pdo_pgsql::MetaTables(), ADODB_pdo_oci::MetaTables(), ADODB_pdo_mysql::MetaTables(), ADODB_odbc_mssql::MetaTables(), ADODB_oci8::MetaTables(), and ADODB_mysql::MetaTables(). |
|
Always force a new connection to database - currently only works with oracle
Definition at line 449 of file adodb.inc.php. References Connect(). |
|
PEAR DB Compat - do not use internally. Definition at line 573 of file adodb.inc.php. References GenID(). |
|
All error messages go through this bottleneck function. You can define your own handler by defining the function name in ADODB_OUTP. Definition at line 360 of file adodb.inc.php. Referenced by ADODB_odbc::_connect(), ADODB_ldap::_connect(), ADODB_db2::_connect(), ADODB_ado::_connect(), ADODB2_oci8::_CreateSuffix(), ADODB2_access::_CreateSuffix(), _gencachename(), ADODB_DataDict::_GenFields(), ADODB_odbc::_pconnect(), ADODB_oci8::_query(), ADODB_ibase::_query(), adoSchema::addSQL(), Affected_Rows(), ADODB2_postgres::AlterColumnSQL(), ADODB2_informix::AlterColumnSQL(), ADODB2_ibase::AlterColumnSQL(), ADODB2_generic::AlterColumnSQL(), ADODB2_db2::AlterColumnSQL(), ADODB2_access::AlterColumnSQL(), AutoExecute(), ADODB_mysql::BeginTrans(), ADODB_oci8::Bind(), CacheExecute(), CacheFlush(), CacheSelectLimit(), CompleteTrans(), Connect(), ADODB2_postgres::DropColumnSQL(), ADODB2_informix::DropColumnSQL(), ADODB2_ibase::DropColumnSQL(), ADODB2_generic::DropColumnSQL(), ADODB2_db2::DropColumnSQL(), ADODB2_access::DropColumnSQL(), ADODB_Active_Record::Error(), Execute(), ADODB_DataDict::ExecuteSQLArray(), FailTrans(), GetActiveRecordsClass(), Insert_ID(), ADODB_pdo_pgsql::MetaColumns(), perf_mysql::optimizeTable(), adodb_perf::OptimizeTable(), ADODB_oci8::Parameter(), PConnect(), ADODB_mssqlpo::PrepareSP(), StartTrans(), ADODB_Active_Record::UpdateActiveTable(), ADODB_oci8::UpdateBlob(), ADODB_oci8::UpdateBlobFile(), and xCacheFlush(). |
|
Will select the supplied $page number from a recordset, given that it is paginated in pages of $nrows rows per page. It also saves two boolean values saying if the given page is the first and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination. See readme.htm::ex8 for an example of usage.
Definition at line 2541 of file adodb.inc.php. |
|
Establish persistent connect to database
Definition at line 464 of file adodb.inc.php. References Connect(), ErrorMsg(), ErrorNo(), and outp(). |
|
Portable Insert ID. Pablo Roca <pabloroca::mvps.org>
Definition at line 988 of file adodb.inc.php. References GetOne(), and Insert_ID(). |
|
Should prepare the sql statement and return the stmt resource. For databases that do not support this, we return the $sql. To ensure compatibility with databases that do not support prepare: $stmt = $db->Prepare("insert into table (id, name) values (?,?)"); $db->Execute($stmt,array(1,'Jill')) or die('insert failed'); $db->Execute($stmt,array(2,'Joe')) or die('insert failed');
Reimplemented in ADODB_db2, ADODB_ibase, ADODB_odbc, ADODB_odbtp, and ADODB_pdo. Definition at line 515 of file adodb.inc.php. Referenced by Execute(), and PrepareSP(). |
|
Some databases, eg. mssql require a different function for preparing stored procedures. So we cannot use Prepare(). Should prepare the stored procedure and return the stmt resource. For databases that do not support this, we return the $sql. To ensure compatibility with databases that do not support prepare:
Definition at line 534 of file adodb.inc.php. References Prepare(). |
|
Requested by "Karsten Dambekalns" <k.dambekalns@fishfarm.de> Definition at line 550 of file adodb.inc.php. References qstr(). |
|
Correctly quotes a string so that all strings are escaped. We prefix and append to the string single-quotes. An example is $db->qstr("Don't bother",magic_quotes_runtime());
Reimplemented in ADODB_mysql, ADODB_oci8, ADODB_postgres64, and ADODB_vfp. Definition at line 2500 of file adodb.inc.php. Referenced by ADODB_csv::_Execute(), Execute(), ADODB_odbc_mssql::MetaForeignKeys(), ADODB_pdo_pgsql::MetaTables(), ADODB_pdo_oci::MetaTables(), ADODB_pdo_mysql::MetaTables(), ADODB_odbc_mssql::MetaTables(), q(), QMagic(), Quote(), and ADODB_sqlite::SQLDate(). |
|
PEAR DB Compat - do not use internally. Definition at line 625 of file adodb.inc.php. References Execute(). |
|
PEAR DB Compat Definition at line 542 of file adodb.inc.php. References qstr(). Referenced by ADODB_SAPDB::MetaColumnNames(), ADODB_SAPDB::MetaColumns(), ADODB_SAPDB::MetaIndexes(), and ADODB_SAPDB::MetaPrimaryKeys(). |
|
Insert or replace a single record. Note: this is not the same as MySQL's replace. ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL. Also note that no table locking is done currently, so it is possible that the record be inserted twice by two programs... $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname'); $table table name $fieldArray associative array of data (you must quote strings yourself). $keyCol the primary key field name or if compound key, array of field names autoQuote set to true to use a hueristic to quote strings. Works with nulls and numbers but does not work with dates nor SQL functions. has_autoinc the primary key is an auto-inc field, so skip in insert. Currently blob replace not supported returns 0 = fail, 1 = update, 2 = insert Definition at line 1466 of file adodb.inc.php. |
|
If database does not support transactions, rollbacks always fail, so return false
Reimplemented in ADODB_ado, ADODB_ado, ADODB_ado_access, ADODB_db2, ADODB_ibase, ADODB_mysqlt, ADODB_oci8, ADODB_odbc, ADODB_odbtp, ADODB_oracle, ADODB_pdo, ADODB_postgres64, ADODB_sqlite, and ADODB_sybase. Definition at line 2093 of file adodb.inc.php. Referenced by CompleteTrans(), and RollbackLock(). |
|
Lock a row, will escalate and lock the table if row locking not supported will normally free the lock at the end of the transaction
Definition at line 585 of file adodb.inc.php. |
|
Choose a database to connect to. Many databases do not support this.
Reimplemented in ADODB_fbsql, ADODB_ibase, ADODB_ldap, ADODB_mysql, ADODB_oci8, ADODB_odbtp, and ADODB_sybase. Definition at line 1079 of file adodb.inc.php. Referenced by ADODB_pdo_mysql::MetaColumns(). |
|
Will select, getting rows from $offset (1-based), for $nrows. This simulates the MySQL "select * from table limit $offset,$nrows" , and the PostgreSQL "select * from table limit $nrows offset $offset". Note that MySQL and PostgreSQL parameter ordering is the opposite of the other. eg. SelectLimit('select * from table',3); will return rows 1 to 3 (1-based) SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based) Uses SELECT TOP for Microsoft databases (when $this->hasTop is set) BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set
Reimplemented in ADODB_borland_ibase, ADODB_firebird, ADODB_mysql, ADODB_oci8, ADODB_oci805, ADODB_odbc_mssql, ADODB_odbtp, ADODB_pdo_base, ADODB_pdo, ADODB_pdo_mssql, ADODB_pdo_mysql, ADODB_pdo_pgsql, ADODB_postgres7, ADODB_sqlite, ADODB_sybase, and ADODB_vfp. Definition at line 1102 of file adodb.inc.php. References _rs2rs(), CacheExecute(), and Execute(). Referenced by LimitQuery(), ADODB_vfp::SelectLimit(), ADODB_sybase::SelectLimit(), ADODB_pdo_mssql::SelectLimit(), ADODB_pdo_base::SelectLimit(), ADODB_odbtp::SelectLimit(), ADODB_odbc_mssql::SelectLimit(), ADODB_ODBC_DB2::SelectLimit(), and ADODB_oci805::SelectLimit(). |
|
Create serializable recordset. Breaks rs link to connection.
Definition at line 1170 of file adodb.inc.php. References _rs2rs(). |
|
Get server version info...
Reimplemented in ADODB_ado, ADODB_ado, ADODB_borland_ibase, ADODB_db2, ADODB_firebird, ADODB_ibase, ADODB_ldap, ADODB_mysql, ADODB_oci8, ADODB_odbc, ADODB_ODBC_DB2, ADODB_odbc_mssql, ADODB_odbtp, ADODB_pdo_base, ADODB_pdo, ADODB_pdo_mssql, ADODB_pdo_mysql, ADODB_pdo_pgsql, ADODB_postgres64, ADODB_SAPDB, and ADODB_sqlite. Definition at line 340 of file adodb.inc.php. Referenced by ADODB_pdo_mssql::ServerInfo(), ADODB_pdo_base::ServerInfo(), ADODB_odbc::ServerInfo(), and ADODB_db2::ServerInfo(). |
|
Change the SQL connection locale to a specified locale. This is used to get the date formats written depending on the client locale. Definition at line 1930 of file adodb.inc.php. |
|
PEAR DB Compat - do not use internally. The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical for easy porting :-)
Definition at line 609 of file adodb.inc.php. Referenced by ADODB_sqlite::MetaColumns(), ADODB_SAPDB::MetaColumns(), ADODB_pdo_pgsql::MetaColumns(), ADODB_pdo_oci::MetaColumns(), ADODB_pdo_mysql::MetaColumns(), ADODB_oci8::MetaColumns(), ADODB_netezza::MetaColumns(), ADODB_sqlite::MetaIndexes(), ADODB_SAPDB::MetaIndexes(), ADODB_oci8::MetaIndexes(), ADODB_mysql::MetaIndexes(), ADODB_ibase::MetaIndexes(), and ADODB_odbtp::MetaTables(). |
|
Improved method of initiating a transaction. Used together with CompleteTrans(). Advantages include:
a. StartTrans/CompleteTrans is nestable, unlike BeginTrans/CommitTrans/RollbackTrans. Only the outermost block is treated as a transaction. Definition at line 712 of file adodb.inc.php. References BeginTrans(), and outp(). |
|
Also in ADORecordSet.
Reimplemented in ADODB_sybase. Definition at line 2371 of file adodb.inc.php. Referenced by DBDate(), and ADORecordSet::UnixDate(). |
|
Also in ADORecordSet.
Reimplemented in ADODB_sybase. Definition at line 2395 of file adodb.inc.php. Referenced by DBTimeStamp(), ADODB_pdo::Time(), ADODB_oci8::Time(), Time(), and ADORecordSet::UnixTimeStamp(). |
|
Update a blob column, given a where clause. There are more sophisticated blob handling functions that we could have implemented, but all require a very complex API. Instead we have chosen something that is extremely simple to understand and use. Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course. Usage to update a $blobvalue which has a primary key blob_id=1 into a field blobtable.blobcolumn: UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1'); Insert example: $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); Reimplemented in ADODB_db2, ADODB_ibase, ADODB_oci8, ADODB_odbc, and ADODB_odbtp. Definition at line 1839 of file adodb.inc.php. Referenced by ADODB_postgres64::UpdateBlobFile(). |
|
Usage: UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1'); $blobtype supports 'BLOB' and 'CLOB' $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); $conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1'); Reimplemented in ADODB_ibase, ADODB_oci8, and ADODB_postgres64. Definition at line 1853 of file adodb.inc.php. |
|
Usage: UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB'); $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)'); $conn->UpdateClob('clobtable','clobcol',$clob,'id=1'); Definition at line 1907 of file adodb.inc.php. |
|
Also in ADORecordSet. Format database date based on user defined format.
Definition at line 2425 of file adodb.inc.php. |
|
Definition at line 2446 of file adodb.inc.php. |
|
then returned by the errorMsg() function A variable which was used to keep the returned last error message. The value will Definition at line 309 of file adodb.inc.php. |