The syntax is correct but the logic escapes me.

On Jan 7, 4:14 pm, Thadeus Burgess <[email protected]> wrote:
> So just to check my logic, this is the correct way to DALism the query?
>
> where = (db.orders.customer_id == None)
> lefton = (db.customers.customer_id == db.orders.customer_id)
> members = db(where).select(db.customers.ALL, left=db.orders.on(lefton))
>
> -Thadeus
>
> On Thu, Jan 7, 2010 at 4:02 PM, Thadeus Burgess <[email protected]> wrote:
> > This would be a sample query in MYSQL... I just do not know how to
> > port this to DAL syntax :)
>
> > SELECT customers.* FROM customers LEFT JOIN orders ON
> > customers.customer_id = orders.customer_id WHERE orders.customer_id IS
> > NULL
>
> > -Thadeus
>
> > On Thu, Jan 7, 2010 at 3:29 PM, Thadeus Burgess <[email protected]> 
> > wrote:
> >> Query for records that are in one table but not in another table?
>
> >> myrecord
> >> -----------
> >> theid -> FK -> listofstuff
> >> datetitme
>
> >> listofstuff
> >> -----------
> >> myid
> >> myname
> >> myvalue
>
> >> So basically, I want all listofstuff that does not have a record in 
> >> myrecord
>
> >> -Thadeus
>
>
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-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/web2py?hl=en.


Reply via email to