On 4/11/06, lew ghiewa <[EMAIL PROTECTED]> wrote:
> in my case,while wanting to create a Order(SQLObject) in mySQL
> database,error occurs!
> maybe the answer is "order" is a reserver word in SQL-language.
That's correct. For example, this SQL query gets the "name" and "age"
fields from the table named "people", and returns them ordered by age:
SELECT name, age FROM people ORDER BY age
Personally, I've taken the approach of _always_ specifying a project
prefix in either the SQLObject class name or in the sqlmeta. For
example, if your app name is "Spam", either name your objects:
class SpamOrder(SQLObject):
or else put it in the sqlmeta inner class:
class Order(SQLObject):
class sqlmeta:
table = 'spam_order'
This gets even more important when you start using multiple apps together.
--
Tim Lesher <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---