Check out example codes for "sqlite3.OperationalError: near "7": syntax error". It will help you in understanding the concepts better.

Code Example 1

cur.execute('UPDATE "{}" SET Times=? WHERE Name=?'.format(group.replace('"', '""')),
            (times_before + 1, food))

Code Example 2

cur.execute('INSERT INTO "{}" VALUES(?, ?)'.format(group.replace('"', '""')), (food, 1))

Code Example 3

cur.execute('SELECT COUNT(Name) FROM "{}" WHERE Name=?'.format(group.replace('"', '""')), (food,))

Learn ReactJs, React Native from akashmittal.com