This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.2 » using CASE WHEN ELSE in Doctrine
using CASE WHEN ELSE in Doctrine [message #98713] Fri, 07 May 2010 23:41
ftoledo  is currently offline ftoledo
Messages: 8
Registered: January 2008
Location: Dock Sud
Junior Member

Hi all

any chance to use CASE,WHEN from postgres?:

$q= new Doctrine_Query();
  ->addSelect("fecha, CASE WHEN fecha <'2010-10-10' 
       THEN '2009-09-09' ELSE fecha END as new_fecha")

i get a syntax error because the dql parser compute that "CASE" is a field of my_table?

any workaround is appreciated! Confused


Dock Sud BBS
Previous Topic:slot / partial / or component for container div
Next Topic:Symfony Users in Vancouver BC Canada
Goto Forum:

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software