Results 1 to 8 of 8
  1. #1
    Full Member dak142's Avatar
    Join Date
    January 18th, 2005
    Posts
    386
    I am working with datafeeds, here is what I am attempting to do. I am connecting to a FTP site using PHP, that was easy. Now that I am connected, what do I have to do to get a file from that site into a mySQL database. I understand basic PHP and mySQL, I have been teaching myself over the last month or so. What command sequence will I need to accomplish this task? I just need to get pointed in the right direction to further educate myself. Any help will be greatly appreciated.

  2. #2
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    I use this code to add the file to my database. You can do the downloading of the file bit yourself. (hint. try wget)


    system("mysqlimport -u DATABASEUSER -pDATABASEPASSWORD -d --local --fields-terminated-by='DELIMITER' DATABASENAME PATHTOFILE");

    things to note
    <UL TYPE=SQUARE><LI>the -d switch empties the table before adding your file
    <LI> no space between -p and your password
    <LI>your table name must equal your filename. eg. your path is /usr/home/public_html/overstock.txt then your table must be named overstock . Use rename if you want something different.
    <LI> delimiter is the field seperator. eg \t = tab, | (pipe), || (double pipe)
    <LI> I'm sure there are other ways to do this.
    <LI> this works on my server. you may have different results[/list]

  3. #3
    Full Member dak142's Avatar
    Join Date
    January 18th, 2005
    Posts
    386
    Pete,

    How can I execute that command, I do not have shell access on my server, any suggestions?

  4. #4
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    Through the php 'system' command, as I have it.

    If mysqlimport is installed and you give it the right settings, it'll work

  5. #5
    Affiliate Manager
    Join Date
    January 18th, 2005
    Posts
    1,056
    A great tool that I like to use is Navicat. It takes all that hassle away and makes things much easier. There is a 30-day free trial so you can use the full functional version for that time to play around with it and test it out.

    Well worth the dough in my opinion. Saved me alot of time.

    http://www.navicat.com/shareware.php3

  6. #6
    Full Member
    Join Date
    January 18th, 2005
    Posts
    379
    Are you trying to get the datafeed from a remote server ?

  7. #7
    Full Member dak142's Avatar
    Join Date
    January 18th, 2005
    Posts
    386
    Chet,

    I downloaded that software, and in the matter of 2 minutes it created a table and uploaded a very large feed! When the time is right I do want to automate, but with my current skill level, I will work with this software until I learn more PHP. For Certain, this is an awsome piece of software for a datafeed newbie. Thank you everyone for your help, it was great, I am just technically defunct!

  8. #8
    Full Member dak142's Avatar
    Join Date
    January 18th, 2005
    Posts
    386
    Chet,

    Are you aware of any other software out there that would be a good "companion" for Navicat. When I say "companion", I mean any other software that would also ease the learning curve for a datafeed newbie as myself.

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. So i've got the datafeed into mysql database..
    By chillini in forum Programming / Datafeeds / Tools
    Replies: 10
    Last Post: December 2nd, 2008, 02:06 PM
  2. Inserting datafeed into MySql
    By RH&A in forum ShareASale - SAS
    Replies: 12
    Last Post: March 7th, 2007, 10:39 AM
  3. Anyone Use a DataFeed with MySQL or SQL Server?
    By johnnyWebAffiliate in forum Programming / Datafeeds / Tools
    Replies: 29
    Last Post: April 23rd, 2006, 12:43 PM
  4. Datafeed/webmerge VS Php/mysql datafeed
    By Lasthope in forum Programming / Datafeeds / Tools
    Replies: 7
    Last Post: November 25th, 2004, 10:23 PM

Posting Permissions

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