PHP - Read from CSV and build SQL queries

Concluído Postado Mar 7, 2013 Pago na entrega
Concluído 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.

MySQL PHP Arquitetura de software

ID do Projeto: #4310096

Sobre o projeto

34 propostas Projeto remoto Ativo em Mar 7, 2013

Concedido a:

gracebasilior

Hi, I can do it for you. Please see PM!

$40 USD em 1 dia
(65 Comentários)
5.5

34 freelancers estão ofertando em média $80 nesse trabalho

toinnisfree

quick pro help. ftp and milestone required.

$135 USD in 2 dias
(531 Comentários)
7.9
phpexp

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.

$99 USD in 2 dias
(165 Comentários)
7.7
RockStone435

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?

$85 USD in 7 dias
(308 Comentários)
7.6
rajeshsonisl

Quality work assured. Ready to get started. Thanks.

$200 USD em 1 dia
(370 Comentários)
6.9
hoangvandungbk

i can help you this project

$100 USD in 2 dias
(260 Comentários)
6.7
wontonesaju

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

$45 USD em 1 dia
(165 Comentários)
6.6
onedeepen

Ready to start. Please check PMB for portfolio and other details. regards

$30 USD em 1 dia
(36 Comentários)
5.8
dzmitrij

Hello, Can make such a work quickly. Comleted previously many task with csv. Regards. Dima

$30 USD em 1 dia
(66 Comentários)
5.7
smartdatasoft

hello, i am ready to do your job. i can do both in asp.net or php i am expert on both.

$150 USD in 2 dias
(120 Comentários)
5.7
bogdanperian

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.

$60 USD in 0 dias
(17 Comentários)
5.2
drupal1

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.

$120 USD in 2 dias
(28 Comentários)
5.1
xplorr007

Lets do it right away!!

$50 USD em 1 dia
(21 Comentários)
4.8
phpthebest

Hi, I am ready to do this project.

$30 USD in 0 dias
(33 Comentários)
4.7
alrazon

Read your details and interested to work, thanks.

$50 USD in 5 dias
(29 Comentários)
4.5
shaz123

Hi ===YESS!! WE ARE EXPERT IN WEB DEVELOPING, HTML, XHTML, CSS, JAVASCRIPT, JQUERRY, PHP, SEO, ECOMMERCE, WORDPRESS, JOOMLA, AJAX, DRUPAL,MAGENT,O XML, ANDROID APP,IPAD APP,IPHONE APP. , WE LOVE TO DEVELOP AND DESIGN== Mais

$250 USD in 7 dias
(9 Comentários)
4.6
luantnd

Hi, I can do it quick

$150 USD in 0 dias
(35 Comentários)
4.5
alexmoss

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.

$50 USD em 1 dia
(2 Comentários)
4.5
WSolutionsinc

Hi sir, please check private message sent. Thank you!

$120 USD in 3 dias
(20 Comentários)
4.3
gatiworks

I am an expert in PHP MySQL. Given a chance will do the quality work for sure

$120 USD in 4 dias
(34 Comentários)
4.2
TechnoCloud

Hi, I have over 5 years of experience in php / mysql . I can finish this simple job in couple of hours.

$30 USD em 1 dia
(10 Comentários)
4.2