PHP - Read from CSV and build SQL queries
$30-250 USD
Pago na entrega
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.
ID do Projeto: #4310096
Sobre o projeto
Concedido a:
34 freelancers estão ofertando em média $80 nesse trabalho
Your requirement is fully clear to me and i am ready to start. I have done such type of work many times. Please check the PMB for details.
I think, I will need the CSV to investigate some details. Moreover, if column position might differ, then do you ensure that there is a header row which contains column names?
Hi i am providing my quote for this job. based on your specification i am submitting my quote. if possible can i see your csv file? regards saju
hello, i am ready to do your job. i can do both in asp.net or php i am expert on both.
Cheers, +5 years experience in Web development ( PHP/SQL) and data processing. I can finish your script today , error free . Let me know if you need my services.
Hi, I have experience with process data on CSV file with PHP, I sure 100% I can do it right for you. Please see PMB.
Hi, can write such CSV parsing script for you and help test/integrate within 1 day. Please let me know if you're instereated. Thanks, Alex.
Hi, I have over 5 years of experience in php / mysql . I can finish this simple job in couple of hours.