skip to Main Content

Ajax inserting duplicate records in Mysql Database – Jquery ajax

I have the following Ajax Code for submitting data to Mysql DB. <script> var amountdue; var amount; $('#btn-submit').on('click',function(e){ e.preventDefault(); if ($("#customer").validationEngine('validate')) { swal({ title: "Submit Confirmation", text: "Are you sure to submit the data?", type: "warning", showCancelButton: true, confirmButtonColor: "#126495",…

VIEW QUESTION

I am trying to import a csv file to mysql using python. I am getting an error ' TypeError: not enough arguments for format string' – Phpmyadmin

I am using phpmyadmin for mysql databse. import csv import MySQLdb import pymysql db = pymysql.connect( host="127.0.0.1", port=3308, user="root", passwd="", db="database_name" ) cursor = db.cursor() csv_data = csv.reader(r'E:py_docsfile101.csv') next(csv_data) for row in csv_data: cursor.execute('INSERT INTO table_name(A, B, C, D, E,…

VIEW QUESTION
Back To Top
Search