[Symfony] Executer une requête spécifique (custom query) avec Propel
$con = Propel::getConnection(); $stmt = $con->prepareStatement('SELECT foo, bar FROM baz WHERE name=? AND active=?'); $stmt->setString(1, 'MyName'); $stmt->setString(2, '1'); $rs = $stmt->executeQuery(ResultSet::FETCHMODE_NUM);
Ou encore plus con :
Propel::getConnection()->executeUpdate('SET FOREIGN_KEY_CHECKS=0');
You need to create an account or log in to post a comment or rate this snippet.
