Dear ALL,
i am working with sqlite i have a table called "Video" like this :
db.define_table('Videos',
Field('Title'),
Field('Hits','integer',default=1),
Field('Arabic_Title'),
Field('Bits_on_The_Run_Script'),
Field('Youtube_Video_Url'),
Field('Description','text',length=1000),
Field('Arabic_Description','text',length=1000),
Field('Publish_Date','datetime',default=now),
Field('Teacher',db.Teachers),
Field('Instroument',db.Instruments),
Field('Level',requires=IS_IN_SET(Course_level,zero=None)),
Field('Style'),
Field('Video_Type',requires=IS_IN_SET(Video_type,zero=None)),
Field('Course_ID'),
Field('Song_ID',db.Songs),
Field('Price',default=0),
Field('Full_Course_Price',default=0),
Field('Cover','upload'),
Field('PDF','upload'),
Field('Like','integer',default=1),
Field('ShowonSideBar','boolean'),
Field('HomePageVideo','boolean'),
Field('Order_Number','integer')
)
Now i use this to get recordes :
video = db().select(db.Videos.ALL) , it works fine but when i add one
condition for it , it works well two but if i did this , it just takes
the first condition and ignore the rest :
video = db(db.Videos.Video_Type == "XXX" and db.Videos.Teacher ==
"xx").select(db.Videos.ALL)
What do you think is the problem , what am i messing ??
Best Regards,
Hassan Alnatour