[TYPO3-english] BE Modul Script and External DB

Aji Yahya aji.yahya at gmail.com
Fri Nov 11 11:46:40 CET 2011


Hello List,

i have a BE-Modul that connect to External DB, everything working fine. 
An ajax function (jquery) inside my index.php for updating some Records 
in the external DB. i created a script: update.php and this is working 
too.
the only problem is i cannot connect to DB inside update.php

i tried this inside update.php:

global $external_db;
$GLOBALS['TYPO3_DB'] = t3lib_div::makeInstance('t3lib_db');
$GLOBALS['TYPO3_DB']->sql_pconnect($external_db['typo_db_host'],$external_db['typo_db_username'],$external_db['typo_db_password']);
$GLOBALS['TYPO3_DB']->sql_select_db($external_db['typo_db']);

$external_db is defined in localconf.php

could you please help me?

many thanks and best Regards
Aji


More information about the TYPO3-english mailing list