nixonron <nixon...@yahoo.com> wrote:
>       cursor.execute("UPDATE country SET slug=%s WHERE country_cd=%s",
>                       (slugify(country_name), country_cd))
>       conn.commit()
>
>
> Here is the error message
>
> Traceback (most recent call last):
>  File "C:\Python25\ron_scripts\newsqlite.py", line 9, in <module>
>    (slugify(country_name), country_cd))
> sqlite3.OperationalError: near "%": syntax error

%s is not a valid syntax for UPDATE statement. If you are trying to use 
a parameterized query, the correct syntax for parameter placeholders is 
documented here: http://sqlite.org/c3ref/bind_blob.html

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to