+ Reply to Thread
Results 1 to 4 of 4

 

Thread: Datafeeds Mysql & Php

  1. #1
    scriptmonkey's Avatar
    Oranges & Lemons

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Worthing
    Posts
    1,575
    Thanks
    107
    Thanked 249 Times in 189 Posts


    Picture the scenario, you have access to a gzipped csv datafeed, maybe from awin, maybe from webgains or another network.

    You don't know what fields are in it, you want to make a mysql database from this gzipped file.

    What if you could just copy the download url into a php file and then run that file which would create your mysql table with field definitions to match the data, and field names which are in the first line of the csv file?

    You already have a mysql database on your hosting account and you just want to fill it with lovely data. Then this is for you.

    Download Gzipped CSV File and insert contents into MYSql table | Pan Fashion
    Time passes. Listen. Time passes. Dylan Thomas
    CIAO Super SIC

  2. The Following User Says Thank You to scriptmonkey For This Useful Post:

    kododesign (31-07-09)

  3. #2
    Registered User

    Status
    Offline
    Join Date
    Apr 2009
    Posts
    236
    Thanks
    23
    Thanked 14 Times in 13 Posts
    Hi Scriptmonkey

    Thanks for the code, unfortunately I've run into a bit of trouble with it.

    There seems to be an issue with creating the table, and on running the script, the following is displayed.

    CREATE TABLE IF NOT EXISTStesttable (fields displayed here)Table 'blah.testtable' doesn't exist

    Any idea what could be causing this?

    cheers

  4. #3
    Registered User

    Status
    Offline
    Join Date
    Apr 2009
    Posts
    236
    Thanks
    23
    Thanked 14 Times in 13 Posts
    False alarm!

    I created the table manually, and now it's happy.

    thanks again

  5. #4
    Registered User

    Status
    Offline
    Join Date
    Nov 2008
    Posts
    33
    Thanks
    2
    Thanked 0 Times in 0 Posts
    This script was really useful, thank you very much

+ Reply to Thread


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Best PHP & MySQL
    By Stellar in forum Programming
    Replies: 13
    Last Post: 28-07-06, 05:27 PM
  2. MYSQL Help Please
    By SmallBizSoftware in forum Affiliate Marketing Lounge
    Replies: 2
    Last Post: 21-03-06, 11:28 PM
  3. MySQL Help!
    By ukyellowpage in forum Programming
    Replies: 17
    Last Post: 19-02-05, 12:12 PM
  4. CSV -> MySQL
    By shanesdomainuk in forum Programming
    Replies: 3
    Last Post: 23-11-04, 01:08 PM
  5. MySQL
    By Stuart in forum Programming
    Replies: 8
    Last Post: 18-04-04, 09:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2