Database query failed: Unknown column 'lesson' in 'where clause'