insert into mysql file and it's directory using Python -


i combine file_name , directory insert mysql table using python.

the code

cursor.execute("insert library (book_name, author, written, book_link, images) values (%s, %s, %s, 'library/'%s, 'images/'%s )" , (book_name, author, written, book_link, images))

gives me unwanted single quote ' symbols, this:

images/'me ibrary/'my life

how avoid wrong syntax?


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -