I had the same problem and modified BasePeer->doInsert() and BasePeer-
>doUpdate() to escape the field names. It works for MySQL I'm not sure
of others.

Change
                                . " (" . implode(",", $columns) . ")"
to
                                . " (`" . implode("`,`", $columns) . "`)"
and
                                        $sql .= substr($col, strpos($col, '.') 
+ 1) . " = ?,";
to
                                        $sql .= '`' . substr($col, strpos($col, 
'.') + 1) . "` = ?,";

Thanks,
Michael

On Aug 17, 11:25 am, "Alex Salle" <[EMAIL PROTECTED]> wrote:
> Damn. :P . Guess I'll have to rename that one. :/
>
> On 8/17/07, Kiril Angov <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> >  Alex Salle wrote:
>
> > Is symfony incompatible with MySQL 5? It's throwing:
>
> >  [wrapped: Could not execute query [Native Error: You have an error in
> > your SQL syntax; check the manual that corresponds to your MySQL server
> > version for the right syntax to use near 'condition, estimated_delivery,
> > warranty, categories, brands WHERE products.CATEG' at line 1]
> > It works in MySQL 4, but not in 5. I've rebuilt models using
> > propel-build-model and it still won't work.
>
> > Thanks!
>
> > - Alex
>
> >  http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
>
> > The following are new reserved words in MySQL 5.0:
>
> > ASENSITIVE    CALL    CONDITION
> > CONTINUE    CURSOR    DECLARE
> > DETERMINISTIC    EACH    ELSEIF
> > EXIT    FETCH    INOUT
> > INSENSITIVE    ITERATE    LEAVE
> > LOOP    MODIFIES    OUT
> > READS    RELEASE    REPEAT
> > RETURN    SCHEMA    SCHEMAS
> > SENSITIVE    SPECIFIC    SQL
> > SQLEXCEPTION    SQLSTATE    SQLWARNING
> > TRIGGER    UNDO    WHILE
>
> --
> - Alex


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to