YOu should be looking for this snippet.

// YAML Parser - Spyc
require_once(dirname(__FILE__)."/../lib/Symfony/Util/Spyc.class.php");

// create instance of YAML parser
$spyc = new Spyc();

// load database config
$config = $spyc->load(dirname(__FILE__)."/../config/databases.yml");

// just use the connection parameters
$config = $config["all"]["propel"]["param"];

// Connect to database
mysql_connect($config["hostspec"], $config["username"],
$config["password"]);
mysql_select_db($config["database"]);



On 12/20/07, Peter Bowyer <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> In certain modules I'm connecting directly to PDO rather than using
> Doctrine. While developing I hard-coded the connection details in the
> PDO instantiation, now I'm deploying I'd like to use the settings
> from databases.yml. Are these accessible within the framework?
>
> Thanks,
> Peter
>
>
> >
>


-- 
Bayarsaikhan VOLODYA
Singleton LLC - www.singleton.mn
Cell: +976 99779919

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to