.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt .. role:: underline =============== EXT: rvt\_adodb =============== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: ries van Twisk :Changed: 2006-09-10T08:28:50 :Author: (R.van Twisk) :Email: ries@vantwisk.nl :Info 3: :Info 4: .. _EXT-rvt-adodb: EXT: rvt\_adodb =============== Extension Key: **ltg\_ADOdb** Copyright 2005-2006, (R.van Twisk), This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **EXT: rvt\_adodb 1** **Introduction 1** What does it do? 1 **Users manual 2** FAQ 2 **Administration 2** **Configuration 2** FAQ 3 Known problems 3 **To-Do list 3** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ Not Like Roberts Lemkes this extension it initializes the ADOdb library in your typo3 installation. It will automatically connect to the appropriate databases as provided by the Database Abstraction Layer (DBAL in short) structures found in your typo3temp/ directory. ADOdb is NOT included to keep TER polluted with space, it uses Robert Lemkes extention (called adodb). So WHY you might ask??? Well, I had in the past numerous problems with DBAL (SQL parser, minor speed issues, problems with same tables names in two different databases etc....) Of course this method has down and upsides. :underline:`Using this extention as one downside:` You cannot move a single table to a other database, for example sys\_stat cannot be moved to PostgreSQL for example. Normally this would not be a problem because your 'other' database is something you want to connect to, not moving your typo3 tables to a other DB. Also... at least 50% of the extensions, and properly more are not DBAL ready anyways so better stick to MySQL for now and wait until extension developers are really moving to DBAL (IMHO). :underline:`The upside is this:` 1) Using direct ADOdb interface, no sql parser what-so-ever... means fast interface. 2) Can have the same table name in both databases. 3) Can use cross database schema's using the ADOdb schema class (can import and export schema's to and from XML, which will be used by typo3 in feature at some point I hope...) 4) Can convert your SQL to the new DBAL later on with only minor changes (you have special needs anyways... so this needs to be done no mater what ....). 5) ADOdb is mature and thus stable, and even faster then some standard calls using the ADOdb extension.6) You can use any SQL (joins etc....) BUT bear in mind NOT to use any specific DB functions when you want to make you extension cross database capable!!!! Try to test on more then just your favorite DB!!! **For now I would advice you to use it (adodb & rvt\_adodb) when you have your own special needs, or when a project really requires it (intranet or when you run you own webserver and have full access to everything).** .. _Users-manual: Users manual ------------ The extension will automatically initialize the required databases and brings them into the globals var space to :: $GLOBALS['TYPO3-ADOdb'][]] For example in the configuration below it brings it to: :: $GLOBALS['TYPO3-ADODB']['postgresq_hostip'] $GLOBALS['TYPO3-ADODB']['mysql_hostip'] From then you can use all ADOdb calls directly: :: $resource = $GLOBALS['TYPO3-ADODB']['postgresq_hostip'] -> Execute("SELECT * FROM table WHERE key=123"); while ($array = $resource -> FetchRow()) { print_r($array); } $resource = $GLOBALS['TYPO3-ADODB']['mysql_hostip'] -> Execute("SELECT * FROM table WHERE key=123"); while ($array = $resource -> FetchRow()) { print_r($array); } .. _FAQ: FAQ ^^^ \- I don't have any.... do you? .. _Administration: Administration -------------- \- No administration needed, only a configuration .. _Configuration: Configuration ------------- Configuration is done at the same way as DBAL would do it, so we can easily move back to DBAL when it's stable and mature. That means we are using this array: :: $TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array ( '_DEFAULT' => array ( 'type' => 'native', 'config' => array( 'username' => '', // Set by default (overridden) 'password' => '', // Set by default (overridden) 'host' => '', // Set by default (overridden) 'database' => '', // Set by default (overridden) ) ), 'postgresq_hostip' => array ( 'type' => 'adodb', 'config' => array( 'username' => 'username', 'password' => 'password', 'host' => 'localhost', 'database' => 'databasename', 'driver' => 'postgres' ), ), 'mysql_hostip' => array ( 'type' => 'adodb', 'config' => array( 'username' => 'username', 'password' => 'password', 'host' => 'localhost', 'database' => 'databasename', 'driver' => 'mysql' ), ), ); The name 'postgresq\_hostip & mysql\_hostip'are just a names and is used for recognition later on in your extension (see above). .. ### BEGIN~OF~TABLE ### .. _: :: ^^ .. container:: table-row Config Option :: type Meaning This MUST be ADOdb, otherwise this extension will not initialize the database! .. _: :: ^^ .. container:: table-row Config Option :: config Meaning A array with configuration options for the DB .. _: :: ^^ .. container:: table-row Config Option :: username Meaning User name of the database .. _: :: ^^ .. container:: table-row Config Option :: password Meaning Password of the database .. _: :: ^^ .. container:: table-row Config Option :: host Meaning What system to find the database .. _: :: ^^ .. container:: table-row Config Option :: database Meaning The name of the database .. _: :: ^^ .. container:: table-row Config Option :: driver Meaning The driver that ADOdb is going to use (postgres, mysql, mssql etc... etc...) .. ###### END~OF~TABLE ###### :underline:`Notes:` Note that the configuration '$TYPO3\_CONF\_VARS['EXTCONF']['dbal']['table2handlerKeys'] ' is **NOT** used!!! The \_DEFAULT option is **IGNORED** by this extension! The type **MUST** be ado :underline:`db (lowecase)` .. _FAQ: FAQ ^^^ - Q) I have seen that you have a adodb/ directory, I can put the ADOdb library in there from adodb.sf.net? - A) Yes you can, then it will NOT Robert Lemkes library anymore but the version found in the adodb/ directory. The system checks for the file 'adodb/adodb.inc.php' and if found, it assumes that ADOdb is installed there and will be initialized. This is really handy if you want to use a updated of ADOdb. The version of Robert L. is patched for TYPO3 anyways... .. _Known-problems: Known problems ^^^^^^^^^^^^^^ \- Not know yet... .. _To-Do-list: To-Do list ---------- - Make a BE plugin to show database statistics. - Make a BE plugin for export/import XML schema's |img-1| EXT: rvt\_adodb - 3 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102