Jump to content

importing a text file


blanktarget

Recommended Posts

I can\'t get this text fle imported. I have over one hundreditems I want into one field, the table has two fields, an auto_increm id field and the other field which is varchar data. I get all manner of errors inserting them.

:cry:

$sql= \"INSERT INTO table (\'column_2\') VALUES (\'item_1,\')\";

\"INSERT INTO table (\'column_2\') VALUES (\'item_2,)\";

etc 100 times.

 

if (@mysql_query($sql)) {

echo(\"<h4 align=\'center\'>Your listing has been added</h4><br>\");

} else {

echo(\"<h4>Error the adding the listing: \" .

mysql_error() . \"</h4>\");

}

 

what is wrong?

Link to comment
https://forums.phpfreaks.com/topic/1294-importing-a-text-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.