On Jul 2, 2008, at 8:48 AM, Nate Lowrie wrote:
> I am not sure it this was intentional or not. I have this join in my
> bizobj code:
>
> self.addJoin("Buildings", "`Parts`.`BuildingID` =
> `Buildings`.`BuildingID`", joinType = "left outer")
>
> If I don't have the ` characters in there I get a traceback because
> Dabo doesn't automatically add them like in the addFrom and addField
> methods. Same issue with order by but MySql doesn't seem to care
> about that at least.
addJoin() uses the same logic as addWhere(): the table name is
enclosed by backticks, but the expression passed is left untouched, as
there are too many possible variations to be able to handle them all
properly. addFrom() and addField() are very simple, with the only
variation possible being an alias with the 'as' keyword. You need to
specify the backticks in both addJoin() and addWhere() expressions if
required. BTW, the expression you are using there should not require
backticks; those are only needed for expressions that use keywords as
table/field names, or that contain spaces or other non-alphanumeric
characters. Can you post the traceback?
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]