PHP - Read from CSV and build SQL queries

Budget $30 - $250 USD
Bids 34
Average Bid $80

I have an upload script and I need to make it work with a function that can do the following:

- Read from a CSV file, separator is ","
- The first row in the CSV is the table names, those are the exact same names used in the database in that table so "id" equates to an "id" column in the table same as "city" equates to a "city" column in the table, etc. There are a total of 30 columns in the database table.
- Columns are not in the same order so matching columns regardless of position is needed
- Build an SQL query that UPDATES and INSERTS records from the csv according to the following 2 rules:
* One column is the ID, if the ID is set that means that the record exists and needs to be UPDATEd in the database.
* If the ID field is empty in a row that means that the record doesn't exists and needs to be INSERTED in the database

Just to be clear I have the upload script working and the only thing I need from you is to develop a script that handles the insert and update of the records in the MySQL database as explained above, hopefully in a class/function fashion.

Payment will be 50% when you show me the program working and 50% after I test the code and all possible issues had been resolved.

Post a Project Like This

This project was awarded to

gracebasilior

Grace knew what she was doing. This is my first time working with Freelancer.com and When others came with Extremely high bids, Grace came through with a great deal. She promised to have the website done within 1 day and she came through excellent. She asked alot of questions and made sure everything was what i expected. I would definitely recommend her to anyone using this service, and I do plan on using her again no doubt. Hands down, I believe Grace is a well prepared programmer, and her talents exceed everyone else.
About the Freelancer
gracebasilior Profile Picture

I'm a hardworking girl that can do quality work. HTML, PHP, CSS, Javascript, jQuery, AJAX, XML, SQL and more!

Looking to make some money?

  • Set your budget and the time frame
  • Outline your proposal
  • Get paid for your work

Bids on this Project

  • gatiworks Profile Picture

    gatiworks

    Delhi,  India

    ## BIO PHP MySQL .Net C# Java HTML CSS Joomla OsCommerce Wordpress OpenCart Drupal Android Programming Mobile Programming ## Area of Expertise PHP MySQL .Net C# Java HTML CSS Joomla OsCommerce Wordpress OpenCart Drupal Android Programming Mobile Programming

    PHP, Java, JSP, and Javascript

  • alrazon Profile Picture

    alrazon

    Dhaka,  Bangladesh

    I am a professional web and mobile application developer. Have working experience in different technologies and tools for 5 years. For mobile application development, I do back end coding or can work on existing API. If you need any help on below platform I am here to help you. Web: PHP, MySQL, Yii, CakePHP, CodeIgniter, Drupal, jQuery. Mobile: Android, Titanium, Blackberry 10, PhoneGap, jQuery Mobile. Thanks.

    ASP, Javascript, Visual Basic, and .NET

  • nmDevelopers Profile Picture

    nmDevelopers

    Puttalam,  Sri Lanka

    Hi, I am Working as a web developer past two years. I have more experiance in php related projects such as ebay, Amazon Api's and Web Scraping.

    PHP, Javascript, XML, and Website Design

  • bogdanperian Profile Picture

    bogdanperian

    Bucharest,  Romania

    ***************************************** NOTE: Due to past issues with employers not paying, I never start work or give consulting on the project before I'm awarded the project and the integral payment is placed into Freelancer escrow system ( Note: depends on the project value ). ****************************************** Bachelor in Applied Computer Science, currently enrolled in Master's AIDC. Spare time is spent working as a system administrator. Experience in : - programming/scripting languages ( C/C++, Python, Java, C#, Perl, hell scripting, XHTML/CSS, Javascript/Ajax/Jquery, PHP/SQL ) - ,SEO, code debugging, app security, algorithmics - Networking ( windows/unix system maintenance, security, switches, routers, firewalls ) - Task automation

    PHP, ASP, C Programming, and Java

  • phpthebest Profile Picture

    phpthebest

    Belgrade,  Serbia

    I am developer for HTML, HTML 5, CSS, CSS3 , Flash , ActionScript 2.0 , ActionScript 3.0 , JavaScript , Jquery , Ajax, WordPress, Joomla, PHP , MySQL , Excel and more...

    PHP, Javascript, XML, and Adobe Flash

  • rajibdebslg Profile Picture

    rajibdebslg

    Siliguri,  India

    Technowebs is reputed web design and development team satisfying our customer with our quality service from 7+ years. We guarantee that we will work with you until you get satisfied outcomes. Why hire us? 1. Team of qualified and experienced developers. 2. Great understanding of customers needs and project scope. 3. Suggesting the best solution. 4. High completion rate (94% on date) and repeat hire rate (>30% employers hire us repeatedly). 5. 100% on time and on budget profile. 6. Good communication. Thank you very much for viewing our profile, we hope we will work together.

    PHP, Javascript, XML, and Website Design

  • phpexp Profile Picture

    phpexp

    Dhaka,  Bangladesh

    My Expertise: • Strong commercial skills in PHP, MySQL,Bootstrap, Smarty, JavaScript, Ajax, jQuery,XHTML, DHTML, XML, JSON, Responsive design. • A good hand on Php framework - CodeIgniter, Laravel. • Advanced understanding of database environments and MySQL database. • Working experience with the following technologies: SEO, RSS Feed, XML-RPC, XSLT, SOAP, PostgreSql, CSS. • Working knowledge with page flakes. • Experience with Apache web server. • Ability to multi-task and meet deadlines • Knowledge of current web standards including web 2.0. • Ability to quickly deliver clean code that is correct the first time.

    PHP, Javascript, XML, and Website Design

  • toinnisfree Profile Picture

    toinnisfree

    IKOTA LEKKI AJAH,  Nigeria

    I am a fulltime freelance programmmer with over 10 years programming experience. An expert in PHP / MYSQL / Javascript / AJAX / XML deployments. I particularly specialize in shopping carts and API integrations: payment, shipping, inventory, autoresponders and the like: Interspire, Zencart, Virtuemart, Cubecart, Amember, OSC, TomatoCart, Woocommerce. You will find my services highly reliable and professional. Let me get right to it and deliver your next project with a professional quality that many of my previous customers can attest to.

    PHP, Javascript, XML, and Website Design

  • RockStone435 Profile Picture

    RockStone435

    Islamabad,  Pakistan

    I am a Web Developer who has been working since 2005. I'm comfortable working with many different technologies and languages, including c#, php, mysql, sql server etc. I do have capabilities in Desktop Applications as well, but I mainly work on Websites and Web applications. My areas of expertise involve PHP/MYSQL Web Application Development, Wordpress Development, Application Development etc. I have strong command over custom php and programming. By 2014, I had completed almost 400 Projects on Freelancer.com alone.

    PHP, ASP, C Programming, and Javascript

  • yugiohhus89 Profile Picture

    yugiohhus89

    Ha Noi,  Vietnam

    o Highly responsible at work o Honest, active o Creative and Open-minded o Dynamic, creativeness, eagerness to learn. High self-discipline o Good teamwork and presenting skill

    PHP, Java, Javascript, and XML