Author : beriba | 08/17/2012

Sometimes when you’re building Criteria object you want to know what exactly Propel will produce. To be sure about the query or to debug it. You can do it as simple as that:

$params = array();
$sql = BasePeer::createSelectSql($criteria, $params);
var_dump($sql); //SQL query
var_dump($params); //array of params passed to SQL