Custom SQL queries in symfony 1.4 with Propel

The solution is quite simple, use PDO directly. All the information that you need is in the pdo php page

$connection = Propel::getConnection();
$sql = "YOUR SQL QUERY";
$statement = $connection->prepare($sql);
$statement->execute();

while($result = $statement->fetch(PDO::FETCH_ASSOC))
{
// do something
}

greetings

2 Responses to “Custom SQL queries in symfony 1.4 with Propel”

  1. <a href='http://joaquinnunez.cl/' rel='external nofollow' class='url'>Joaquín Núñez</a>Joaquín Núñez

    3:58 pm
    July 27th, 2010

    so, we are not using propel :p

 

Leave a Reply