| |
doctrine-user |
So you're saying Doctrine_RawSql() bypasses PDO all together? Would I
An an aside, is there anyway to use the '->orderBy(CASE WHEN .. )'
On Jul 7, 2:52 pm, eXtreme <jacek.jedrzejew...@gmail.com> wrote:
> On 7 Lip, 20:06, bmills <br...@millz.net> wrote:
> > I'm having some issue using prepared statements in Doctrine_RawSql.
> > $q = new Doctrine_RawSql();
> > Yields SQL like this:
> > SELECT [list of fields]
> > Any idea why my parameters aren't substituted into the query? Thanks!
be better off working with a PDO object directly?
statement in DQL without getting an Unkown Aggregate exception?
> > Using a query like this:
> > $result = $q->select('{p.*}')
> > ->from('photographers p')
> > ->addComponent('p', 'Photographer')
> > ->where('p.city_id = ?')
> > ->orderBy('CASE WHEN p.lname < ? THEN 1 ELSE 0 END,
> > p.lname ASC')
> > ->execute(array(35, "foo%"));
> > echo $q->getSql();
> > FROM photographers p
> > WHERE p.city_id = ?
> > ORDER BY
> > CASE WHEN p.lname < ? THEN 1 ELSE 0 END, p.lname ASC