| ADOdb Library for PHP Manual | ||
|---|---|---|
| Prev | ADOConnection | Next |
Constructor function. Do not call this directly. Use ADONewConnection( ) instead.
Object that performs the connection to the database, executes SQL statements and has a set of utility functions for standardising the format of SQL statements for issues such as concatenation and date formats.
ADOConnection Fields
databaseType: Name of the database system we are connecting to. Eg. odbc or mssql or mysql.
dataProvider: The underlying mechanism used to connect to the database. Normally set to native, unless using odbc or ado.
host: Name of server or data source name (DSN) to connect to.
database: Name of the database or to connect to. If ado is used, it will hold the ado data provider.
user: Login id to connect to database. Password is not saved for security reasons.
raiseErrorFn: Allows you to define an error handling function. See adodb-errorhandler.inc.php for an example.
debug: Set to true to make debug statements to appear.
concat_operator: Set to '+' or '||' normally. The operator used to concatenate strings in SQL. Used by the Concat function.
fmtDate: The format used by the DBDate function to send dates to the database. is '#Y-m-d#' for Microsoft Access, and ''Y-m-d'' for MySQL.
fmtTimeStamp: The format used by the DBTimeStamp function to send timestamps to the database.
true: The value used to represent true.Eg. '.T.'. for Foxpro, '1' for Microsoft SQL.
false: The value used to represent false. Eg. '.F.'. for Foxpro, '0' for Microsoft SQL.
replaceQuote: The string used to escape quotes. Eg. double single-quotes for Microsoft SQL, and backslash-quote for MySQL. Used by qstr.
autoCommit: indicates whether automatic commit is enabled. Default is true.
charSet: set the default charset to use. Currently only interbase supports this.
dialect: set the default sql dialect to use. Currently only interbase supports this.
metaTablesSQL: SQL statement to return a list of available tables. Eg. SHOW TABLES in MySQL.
genID: The latest id generated by GenID() if supported by the database.
cacheSecs: The number of seconds to cache recordsets if CacheExecute() or CacheSelectLimit() omit the $secs2cache parameter. Defaults to 60 minutes.
sysDate: String that holds the name of the database function to call to get the current date. Useful for inserts and updates.
sysTimeStamp: String that holds the name of the database function to call to get the current timestamp/datetime value.
leftOuter: String that holds operator for left outer join, if known. Otherwise set to false.
rightOuter: String that holds operator for left outer join, if known. Otherwise set to false.
ansiOuter: Boolean that if true indicates that ANSI style outer joins are permitted. Eg. select * from table1 left join table2 on p1=p2.
connectSID: Boolean that indicates whether to treat the $database parameter in connects as the SID for the oci8 driver. Defaults to false. Useful for Oracle 8.0.5 and earlier.
autoRollback: Persistent connections are auto-rollbacked in
PConnect( ) if this is set to true. Default is false.
| Prev | Home | Next |
| ADODB_ASSOC_CASE | Up | Connect |