Jump to content

liltbobas

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by liltbobas

  1. I'm trying to build a script to load tab delimited text files into my database, but I can't get a working query. Here's what I got:

    $command = mysql_query ("LOAD DATA LOCAL INFILE '/file.txt' INTO TABLE electronics FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (ITEM NUMBER, ITEM NAME, CATEGORY, SUB-CATEGORY, DESCRIPTION, WEIGHT, WHOLESALE PRICE, RETAIL PRICE, SHIPPING, HANDLING, CARRIER NAME, QUANTITY IN STOCK, IMAGE SMALL, IMAGE MEDIUM, IMAGE LARGE, DETAIL URL)");

    if ($command) {

    echo "<br>good";

    } else {

    echo "<br>bad";

    }

    It returns bad every time. Any suggestions? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.