Consulta de actualización utilizando Propel
Esta es otra manera de actualizar uno o varios registros usando Propel:
$con = Propel::getConnection(); // select from... $c1 = new Criteria(); $c1->add(CommentPeer::POST_ID, $post_id); // update set $c2 = new Criteria(); $c2->add(CommentPeer::RATING, 5);
___________________________________________________________________________________________________
Si estas una clase Peer:
$con = Propel::getConnection(); // select from... $c1 = new Criteria(); $c1->add(self::POST_ID, $post_id); // update set $c2 = new Criteria(); $c2->add(self::RATING, 5); BasePeer::doUpdate($c1, $c2, $con); BasePeer::doUpdate($c1, $c2, $con);


















Facebook
Twitter
LinkedIn