Re: [symfony-users] Re: Using mysql php functions in symfony

2010-09-07 Thread DEEPAK BHATIA
Thanks, Do I need to put various connections from different databases.yml ? all: propel: class: sfPropelDatabase param: dsn: 'mysql://root:@localhost/rtdb' all: propel: class: sfPropelDatabase param:

Re: [symfony-users] Re: Using mysql php functions in symfony

2010-09-07 Thread DEEPAK BHATIA
I am sure you mean this.. $connection = Propel::getConnection(); $query = 'SELECT MAX(?) AS max FROM ?'; $statement = $connection->prepareStatement($query); $statement->setString(1, ArticlePeer::CREATED_AT); $statement->setString(2, ArticlePeer::TABLE_NAME); $resultset = $statement->executeQuery()

[symfony-users] Re: Using mysql php functions in symfony

2010-09-07 Thread Massimiliano Arione
On 7 Set, 07:52, DEEPAK BHATIA wrote: > I tried accessing some other database than specified in databases.yml. But > below is not working. Please help. > >     $con=mysql_connect("localhost","root",""); >     if(!$con) >     { >       echo "Database Connection Not Estabilished\n"; >       exit(0);