Completed

Generic PHP script to upload data to mysql

I am looking for a generic php script that will let me select a csv file (see sample below) and insert the data in the file in to a mysql database. Details of the the upload should be displayed on the screen. In case of errors, the exact error and line number should also be mentioned. The following features are required.

1) The database name, server ip, username and password would be configured in the script.

2) The table name would be the first row of the csv file.

3) The column names would be the second row of the csv file.

4) The delimiter used in the CSV would be comma (,) but it should be configurable at the top of the script in case I need to change it. All data elements would be enclosed in double quotes ("). Commas in between two double quotes should be ignored.

5) MySQLi should be used.

6) mysqli_real_escape_string() Function should be used to escape any special character.

7) After completing the execution of the script, the number of records inserted should be displayed.

8) In case of error, the entire file should be rolled back using mysql transactions. The line number and error details of the first encountered error should be displayed.

9) Basic validation of the csv file should be done. The following errors should be captured.

-a The database and table name should be a valid one.

-b Column names in the file should be found in the table.

-c Right number of data elements based on the first row

-d Proper enclosure of data in double quotes.

-e NULL values being inserted into NON-NULL columns.

-f proper handling of string and numeric values.

10) The script should be able to handle up to 10,000 rows.

SAMPLE CSV FILE

===============================

"Employees"

"Employee_Name","job_title","salary"

"Mike","CEO","500000.00"

"John","Manager","100000.00"

"Mark","Supervisor","25000.00"

===============================

Skills: MySQL, PHP

See more: script php import access data mysql, upload data mysql database upload file php scriptonline website, php script upload xml product data feed, php script upload import xls file mysql, php script upload data csv ke mysql, php script upload data form sql server, software write mq4, software write chip epson, useful software write book, software write web specs, oscommerce php script import data mysql, free php script upload xml file mysql database, free software write user guide, php upload data mysql image images, software write edid, free software write company profile, generic php script show database data, software write websites idea, software write book images, software write books

About the Employer:
( 13 reviews ) Newark, United Arab Emirates

Project ID: #14025045

Awarded to:

HardlineSoftware

Hi! I already have working parts so I'll do it quickly and qualitatively. I'm ready to start working on your project right now.

$55 USD in 1 day
(27 Reviews)
5.0

37 freelancers are bidding on average $154 for this job

wpoppo

Hello, Thanks for giving me the opportunity to discuss your project. I am a professional PHP developer with an experience of more than 8 years in creating and customizing PHP based websites, themes and plugins/mo More

$250 USD in 5 days
(159 Reviews)
8.1
tranngocanh1702

Hi, I am Anna with more than 5 years experience in PHP, Laravel framework, Slim, CodeIgniter, MySQL, PostgreSQL, HTML, CSS, Javascript, jQuery, Vuejs, Ajax, WordPress template & plugin, WooCommerce. I am able to More

$250 USD in 7 days
(97 Reviews)
7.3
kssalexander2

Dear Sir. My name is Wang I have seen your job description carefully. I am so interested in your project. I am specialize in db and php. If you are awarding me, I will do best service for you and finish it on time More

$150 USD in 3 days
(32 Reviews)
7.1
spiretech

Hello, I have gone through the post and yes; I will help you for sure to build generic php script that will let me select a csv file and insert the data in the file in to a mysql database [login to view URL], [login to view URL] More

$200 USD in 4 days
(78 Reviews)
6.8
ineedWorkJob

Greetings sir, how are you today sir? hope fine. Sir, I have read your project details and i will create php script that will allow you to upload your csv file with data validation and report (on success and err More

$100 USD in 1 day
(116 Reviews)
6.6
csajit

HELLO THERE, Over 200+ Positive Reviews. Over 90% Completion Rate. 5 Star Rating. 10+ Years of experience in PHP/MYSQL I AM INTERESTED IN WORKING ON THIS PROJECT. PLEASE CHECK MY REVIEWS AND THEN DECIDE O More

$120 USD in 3 days
(273 Reviews)
6.8
nsweb

Hello. I'm professional web developer since 2006. My specifications: eCommerce and custom scripts. I have experience in such areas: PHP, MySQL, HTML5, CSS3, JavaScript, Bootstrap, jQuery, XML, csv. I can develop th More

$140 USD in 2 days
(91 Reviews)
6.9
phpprogramming

I am experienced in PHP, MySQL, Javascript, Opencart, CodeIgniter, Cakephp, yii and WordPress. [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] More

$166 USD in 3 days
(203 Reviews)
6.8
dustafo

I can get this done for you pretty quickly, in just a couple days time, just let me know when you are ready to start.

$138 USD in 3 days
(154 Reviews)
6.5
$250 USD in 7 days
(88 Reviews)
6.3
$155 USD in 1 day
(158 Reviews)
6.6
$35 USD in 3 days
(40 Reviews)
6.0
acecoder84

Hello, I have gone through project and understood the requirement. I will be able to create a PHP script which will server the purpose. I am a full time dedicated freelancer having 8 years of PHP and mysql expertise an More

$100 USD in 3 days
(46 Reviews)
5.5
oda79

Hi! I can help you with this project. Had a similar experience about uploading CSV and importing to MySQL. Do you need any special UI? Ready to discuss in chat

$250 USD in 1 day
(17 Reviews)
5.6
whitehorsetechn

Greeting, I have understood your generic php script task and can do it with your 100% satisfaction. Please ping me for more discussion. I have more than 5 years of experience in MySQL, PHP

$150 USD in 2 days
(17 Reviews)
5.0
VangHaleena17

Hi, I have the able to can do your task. I would do my best on your task. You can see also my France client e-commerce site url [login to view URL] and [login to view URL] site More

$155 USD in 3 days
(32 Reviews)
5.4
kazimking

Hello Sir, hope you are fine, I am interested in your work "Generic PHP script". I will create this application in Custom PHP I have 5 year experience in Web Development Service I am able to this job quickly More

$150 USD in 3 days
(34 Reviews)
4.9
rocksiri2017

Dear Client, I read your job description carefully. I have developed website to import CSV to MySQL using PHP and Bootstrap. I can make your website in a day. Also I can start my working now. I will deliver hig More

$100 USD in 3 days
(15 Reviews)
4.8
angeledugo

Hi, I'm Ing of systems With over 10 years of experience developing large-scale applications and providing web technology solutions for freelancers , small, medium and large businesses. Habilidades y experiencia rele More

$138 USD in 2 days
(26 Reviews)
5.0
Web4UTeam

Ready to cooperate with you. My experience is more than 6 years. I work with php, mysql, js, css, html.

$111 USD in 2 days
(13 Reviews)
4.4