Watch_course_sql="""SelectDate_format (From_unixtime (a.createtime/ +) ,'%%y-%%m-%%d%%t') Regtime, A.username fromBskuser awhereA.usernameinch (Selectusername frombskchapterlistwhereLessonid= (SelectID fromBsklesson aWHEREA.lessonname like\'%s\') ) Limit%D -""" %(Coursename, page* -)
the coursename from the front desk should be kanji but if the error comes when the background will be incorrect ' u'subquery returns more than 1 row' just add an any in the relevant location.
The final SQL statement
SelectDate_format (From_unixtime (a.createtime/ +) ,'%y-%m-%d%T') Regtime, a.username username fromBskuser awhereA.usernameinch (Selectusername frombskchapterlistwhereLessonid= any(SelectID fromBsklesson aWHEREA.lessonname like '%2%') )
Related information: Http://stackoverflow.com/questions/778239/mysql-subquery-returns-more-than-one-row
MySQL error ' u ' subquery returns more than 1 row '