SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict trigger's Avatar
    Join Date
    Jun 2003
    Location
    Eagan
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Load local infile with mysql 4.0.18

    I'm having a problem with the local local infile command used to import values from a csv to a mysql table. My code (in php is...)
    Code:
    require_once('../Connections/Connection.php');
    mysql_select_db($database_Connection, $Connection);//connecting
    mysql_query("LOAD DATA LOCAL INFILE 'C:/Documents and Settings/user/My Documents/stuff.TXT' INTO TABLE db.change FIELDS TERMINATED BY ',' (field1,field2,field3,field4)") or die(mysql_error());
    I get the error message "The used command is not allowed with this MySQL version". Is my syntax messed up, or do I need to change something to get this to work?
    Not another drugstore, not another town
    Tired of the overdrop, I had to put it down
    You know I was the man when I put the Crown down
    Then rolled around the Chemicals to pave the New Sound

  2. #2
    SitePoint Addict trigger's Avatar
    Join Date
    Jun 2003
    Location
    Eagan
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    never mind, I just gotta take out the "LOCAL" in the script, now I'm having permission errors, which I will take up with my ISP.
    Not another drugstore, not another town
    Tired of the overdrop, I had to put it down
    You know I was the man when I put the Crown down
    Then rolled around the Chemicals to pave the New Sound


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
  •