python - Trouble Querying Against int Field using MYSQL -
hey, i'm trying run following query:
self.cursor.execute('select courses.courseid, days, starttime, bldg, roomnum, ' 'area, title, descrip, prereqs, endtime ' 'classes, courses, crosslistings, coursesprofs, profs ' 'classes.courseid = courses.courseid , ' 'courses.courseid = crosslistings.courseid , ' 'courses.courseid = coursesprofs.courseid , ' 'coursesprofs.profid = profs.profid , ' 'classes.classid %s' ';', (self.classid))
classid int(11) field in db. when set self.classid = %, returns results, set say, '3454' or other amount returns nothing when there class classid. querying incorrectly against int fields?
even simpler query select * classes classes.classid = '3454'; not work
try:
select * classes classes.classid = 3454;
Comments
Post a Comment