PHP to extract data from mysql

Budget $30 - $250 USD
Bids 40
Average Bid $130

I have to create a php file that will be setted as cron.
this cron will generate two csv files extracting datas from a mysql database (it's a wordpress installation).

-------
CSV 1

header:
ID;ragione sociale;indirizzo;nome;email;telefono;prodotto;licenze;db;erp;commento;newsletter;privacy;IP;referrer;data;lingua;mail inviata

rows:
csv will extract all datas from blk_rg_lead table that has form_id = 73 or 80.

fields:
ID --> field id from blk_rg_lead table
ragione sociale --> field with field_number = 1 and with lead_id = previous field, from blk_rg_lead_detail table
indirizzo --> field with field_number = 37 and with lead_id = previous field, from blk_rg_lead_detail table
nome --> field with field_number = 2 and with lead_id = previous field, from blk_rg_lead_detail table
email --> field with field_number = 3 and with lead_id = previous field, from blk_rg_lead_detail table
telefono --> field with field_number = 29 and with lead_id = previous field, from blk_rg_lead_detail table
prodotto --> field with field_number = 39 and with lead_id = previous field, from blk_rg_lead_detail table
licenze db --> field with field_number = 6 and with lead_id = previous field, from blk_rg_lead_detail table
erp --> field with field_number = 32 and with lead_id = previous field, from blk_rg_lead_detail table
commento --> field with field_number = 41 and with lead_id = previous field, from blk_rg_lead_detail table
newsletter --> field with field_number = 40 and with lead_id = previous field, from blk_rg_lead_detail table
privacy --> field id from blk_rg_lead table
IP --> field ip from blk_rg_lead table
referrer --> field source_url from blk_rg_lead table
data --> field date_created from blk_rg_lead table
lingua --> "it" if field form_id from blk_rg_lead table is = 73, "it" if field form_id from blk_rg_lead table is = 80
mail inviata --> OK

--------
CSV 2

header:
"ID";"Titolo";"Nome";"Cognome";"E-mail";"Telefono";"Fax";"Info via mail";"Aree di interesse";"Come siete venuti a conoscenza";"Posizione";"Azienda";"Settore attività";"Fatturato";"Numero dipendenti";"Certificati (sÏ/no)";"Prodotto di cui si richiede il download";"Tipo di certificazione";"Indirizzo";"Località";"CAP";"Provincia";"Nazione";"Attivo";"Scadenza"

rows:
csv will extract all datas from blk_users table

fields:
ID --> field ID from blk_users table
Titolo --> no data to import
Nome --> field with meta_key = first_name and with user_id = previous field, from blk_usermeta table
Cognome --> field with meta_key = last_name and with user_id = previous field, from blk_usermeta table
E-mail --> field user_email from blk_users table
Telefono --> field with meta_key = user_telefono and with user_id = previous field, from blk_usermeta table
Fax --> no data to import
Info via mail --> no data to import
Aree di interesse --> no data to import
Come siete venuti a conoscenza --> no data to import
Posizione --> no data to import
Azienda --> field with meta_key = user_company and with user_id = previous field, from blk_usermeta table
Settore attività --> no data to import
Fatturato --> no data to import
Numero dipendenti --> no data to import
Certificati (sì/no) --> no data to import
Prodotto di cui si richiede il download --> no data to import
Tipo di certificazione --> no data to import
Indirizzo --> no data to import
Località --> no data to import
CAP --> no data to import
Provincia --> no data to import
Nazione --> no data to import
Attivo --> SI if field with meta_key = user_meta_user_status and with user_id = previous field from blk_usermeta table is = active, else NO
Scadenza --> no data to import

Post a Project Like This

This project was awarded to

kjanssens

Nice clean coder, well written, and extremely quick. Can't ask for more!! Defo be using him again.
About the Freelancer
kjanssens Profile Picture

Highly skilled internet business developer, mad about speed, conformity and scalability. Deeply interested, involved, dedicated and experienced in everything related to DNS.

Looking to make some money?

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

Bids on this Project

  • kjanssens Profile Picture

    kjanssens

    Mataram,  Indonesia

    Highly skilled internet business developer, mad about speed, conformity and scalability. Deeply interested, involved, dedicated and experienced in everything related to DNS.

    PHP, Python, Internet Marketing, and Linux

  • mike25 Profile Picture

    mike25

    Frankfurt am Main,  Germany

    I love a good challenge, communication is very important, time is crucial for all projects.

    PHP, Javascript, XML, and Visual Basic

  • pyostrike Profile Picture

    pyostrike

    Gelendzhik,  Russian Federation

    That's all folks.

    PHP, Perl, C Programming, and XML

  • domenico81 Profile Picture

    domenico81

    latina,  Italy

    I am a software engineer, web programmer with knowledge of PHP, CSS, HTML, Ajax, MySql, SQL. I work on this tecnologies from 10 years. Currently I manage two large web portals, one on tourism and another on entertainment developed by myself. I've done projects on Joomla VirtueMart for shops and works of modification php.

    Javascript, Website Design, AJAX, and Excel

  • SigmaVisual Profile Picture

    SigmaVisual

    Taxila Cantt,  Pakistan

    Web, Bots, Crawlers, and Scrapers Development. I have expertise in automation services and I can automate any manual process.

    PHP, Python, SEO, and Data Entry

  • kpremkumarcse Profile Picture

    kpremkumarcse

    Chennai,  India

    I am PHP Web deveolper who is looking to create real time sites with effective ease

    PHP, Javascript, XML, and Data Processing

  • joomlaexpert4yrs Profile Picture

    joomlaexpert4yrs

    Pune,  India

    I have completed BE[Computer] in 2006, I do have 4+ years of Experience in PHP, I am looking for Quality and Challenging Job in PHP..

    PHP, Javascript, AJAX, and Joomla

  • stefanache Profile Picture

    stefanache

    Bucharest,  Romania

    My applications is based on -CSS/HTML/Javascript(with Ajax and included plugins like Jquery,Prototype,...) -PhP([g]ui or api SOAP/REST-JSON/XML ws [+wsdl])perl,/MySQL I like to work with other frameworks like Google api, Openlayers, Facebook api or others Open api. My favorite sci domains : -Mathematics(include statistics) - Electronics -Economical -Medical ...

    PHP, Perl, Java, and Javascript

  • sunsriinfosys Profile Picture

    sunsriinfosys

    Hyderabad,  India

    I, Shaik Abdul Gafoor, having over 13.5 years of Experience in software design, development and implementation of various commercial applications in Client/Server environment, Web and ERP applications using C#, ASP.Net, VB.Net,WPF, VB 6.0, Crystal Reports 8.5, ASP, PHP, JSP tools, PHP ,PL/SQL, MS SQL Server, My SQL, Opensources like- OSCommerce,Prestashop,SMS API ClickATell, working as team lead in one of leading companies of hyderabad in india

    PHP, ASP, Visual Basic, and .NET

  • manpreet Profile Picture

    manpreet

    New Delhi,  India

    I was Ranked #48 out of over 400,000 users at vWorker.com as on Monday November 19th, 2012 the day vWorker.com closed and merged into Freelancer.com. I joined vWorker on October 27th, 2002. ## BIO I can Provide you the Best Services in Web Solutions, Software Development and Applications at the Cheapest Rates and within the Least Time Frames, please give me a chance to work with you or mail me so that we send you further testimonials. ## Area of Expertise PHP, ASP, VB, CGI, MS SQL, MySQL, JSP, ORACLE, JAVA, XML

    PHP, ASP, Javascript, and Visual Basic