So I have this sql, which works:
cursor.execute('select * from video_title_difference where title like
%s order by provider desc limit %s offset %s',
('%' + search + '%', limit, offset))
BUT if I change the ORDER BY variable (what is now 'provider') to a variable, it doesn't work at all:
cursor.execute('select * from video_title_difference where title like %s
order by %s limit %s offset %s',
('%' + search + '%', order_by, limit, offset))
It 'works' but it doesn't order it at all. What am I doing wrong here?