here is my query
x.execute("UPDATE details SET name =%s,"(form.newname)"WHERE name =%s," (form.name))
am getting syntax error.can anyone pls help to fix it
Based on syntax: cursor.execute(sql_query, args)
It should be like:
x.execute("UPDATE details SET name = %s WHERE name = %s", (form.newname, form.name))
If you want to update those name which is ending with the letter "s"
then you have to use LIKE operator in where clause
update destails set name ="adfsf" where name like '%s'
SETand add appropriate spacing:x.execute("UPDATE details SET name = %s"(form.newname)" WHERE name = %s" (form.name))