My hair-pulling continues...

How can I add more conditions in to the final SELECT. I mean I am able to
get the table objetcs:

class Customer(SQLObject):
    class sqlmeta:
        fromDatabase = True
        idName = "CUST_NO"
    sales = MultipleJoin('Sales', joinColumn='CUST_NO')

class Sales(SQLObject):
    class sqlmeta:
        fromDatabase = True
        idName = "PO_NUMBER"
        idType= str


and than:
for cust in Customer.select(Customer.q.city.startswith('T')):
    ......

Which generates:
SELECT ...(ale tables names here).... FROM customer WHERE ((customer.city)
LIKE ('T%'))

but how can I add more conditions in to the final WHERE clause?
I was trying for example:

for cust in Customer.select(Customer.q.city.startswith('T') or
Customer.q.city.startswith('Q') ):

But this does not work.


Thanks and regards

Petr Jakes
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to