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:
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()
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);