I have a database as follow:
# coding: utf8
from datetime import datetime, date, time
now = datetime.utcnow()
today = date.today()
db = SQLDB('sqlite://paint.sqlite')
db.define_table('order_que',
Field('customer_code', length=30),
Field('paint'),
Field('can_size', requires=IS_IN_SET(['½ Litre', '1 Litre', '10
Litre', '30 Litre'])),
Field('pickup_time'),
Field('que_letter',
requires=IS_IN_SET([None,"A","B","C","D","E","F"])))
db.define_table('paint',
Field('name', length=30, requires=IS_NOT_EMPTY(), unique=True),
Field('base_paint', length=3, requires=IS_NOT_EMPTY()),
Field('hex_color', length=6))
db.define_table('tint',
Field('name', length=3, requires=IS_NOT_EMPTY()))
db.define_table('paint_tints',
Field('paint_id', db.paint),
Field('tint_id', db.tint),
Field('units', 'integer'))
db.order_que.paint.requires = IS_IN_DB(db, 'paint.id', '%(name)s')
db.paint_tints.paint_id.requires=IS_IN_DB(db, 'paint.id', '%(name)s')
db.paint_tints.tint_id.requires=IS_IN_DB(db, 'tint.id', '%(name)s')
db.order_que.customer_code.requires=IS_NOT_EMPTY()
And I am trying to do a join like this...
plate_que = db((db.order_que.que_letter != None) ==
db.paint.name).select()
But no matter what I put into order_que.que_letter I don't get any
results. Any ideas?
BR,
Jason
--
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.