Propel: newbie problems with a criteria. Trying to debug

arturoberlin

New Member
I have this criteria propel.\[code\]public static function getPrenotazioniAttive($id_utente){$c = new Criteria();$c->add(self::USER_ID, 18793 );$result = self::doSelect($c);}\[/code\]After that i add this:\[code\]echo $c->toString();\[/code\]that shows:\[code\] Criteria: SQL (may not be complete): SELECT FROM `prenotazione` WHERE prenotazione.USER_ID=:p1 Params: prenotazione.USER_ID => 18793\[/code\]Then i call the method before this way:\[code\] $prenotazioni = PrenotazionePeer::getPrenotazioniAttive($this->getUser()); var_dump($prenotazioni); die("entro");\[/code\]that creates/execute the SQL clause below.\[code\] SELECT IFNULL(SUM(prenotazione.VALUTAZIONE),0) AS somma, COUNT(*) AS numero FROM `prenotazione` WHERE prenotazione.USER_ID=18793\[/code\]that clause (if i go to phpmyadmin) retrives a row from the table.My problem: \[code\]var_dump($prenotazioni);\[/code\] just return null, any idea?
 
Back
Top