Hi, I need to connect to a second database from my Symfony (1.4/Doctrine) application but don't want to use the ORM to connect to the other db. I can connect like this:
$dsn = 'mysql:host=test;dbname=test'; $user = 'user'; $password = 'pass'; $dbh = new PDO($dsn, $user, $password); $conn = Doctrine_Manager::connection($dbh); $client_id = 103; $body = 'Test post 2 from My App'; // query $sql = "INSERT INTO posts (client_id,body,date) VALUES (:client_id,:body,NOW())"; $q = $conn->prepare($sql); $q->execute(array(':client_id'=>$client_id, ':body'=>$body)); Does anyone know how I can read in the connection info rather than setting it manually? I have tried $conn = DoctrineManager::connection('name of connection') but I get a parsing error. Thanks! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en