[Vtigercrm-developers] Postgres Integration in 4.2.5

Jeff Kowalczyk jtk at yahoo.com
Tue Mar 14 06:24:55 PST 2006


Sergio A. Kessler wrote:
> I always write queries like this:
> 
> $query = <<<END
>     select
>         *
>     from
>         table1,
>         table2,
>     where
>         foo = ?
>         and
>         zeta = ?
>     group by
>         tita
>     order by
>         zeta
> END;

I usually don't go the extra mile to indent, but your way is the clearest
and most diff-friendly, by far.

I do like to capitalize SQL keywords though, could we agree on adding that
to the style standard?

 $query = <<<END
     SELECT
         *
     FROM
         table1,
         table2,
     WHERE
         foo = ?
         AND
         zeta = ?
     GROUP BY
         tita
     ORDER BY
         zeta
 END;

+1 on reformatting SQL queries according to a strict style standard.

Once consensus is reached on a style, a trac ticket should be created, and
each reformat-only commit should include 'refs #XX' in the checkin
message




More information about the vtigercrm-developers mailing list