Syntax: c, conn = connection() c.execute("SELECT * FROM Posts WHERE SUBSTRING_INDEX(name," ",1)=%s",(sin,)) ptitles = [item1[0] for item1 in c.fetchall()]
Error: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1)='Aakash'' at line 1")
But everything works good in mysql console when I try. I done the commit() statements. Need help VERY FAST