Re: [PHP] mysql query and maximum characters in sql statement



Hi Jim Lucas,

You are correct... i want to run in the same way.

but as my 2 tables, column name are different i cant run the LOAD DATA
infile.

And the example you mentioned for break at 100, also i thought to use in
that way. but one of the column had the text type which we cant predict
about the size.

Thanks for the support from all of you.

Now, I am inserting the rows one by one only


On 5/2/08, Chris <dmagick@xxxxxxxxx> wrote:

Jim Lucas wrote:
Waynn Lue wrote:
Wouldn't using LOAD DATA INFILE be better than writing your own script?


depends, does the data file match the table column for column?


Doesn't have to.

http://dev.mysql.com/doc/refman/5.0/en/load-data.html

By default, when no column list is provided at the end of the LOAD DATA
INFILE statement, input lines are expected to contain a field for each
table column. If you want to load only some of a table's columns,
specify a column list:

LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata (col1,col2,...);


But load data infile requires extra mysql privileges.


--
Postgresql & php tutorials
http://www.designmagick.com/




--
Regards,
Sanjeev
http://www.sanchanworld.com | http://webdirectory.sanchanworld.com - submit
your site


Relevant Pages

  • LOAD DATA: NULL im letzten Feld falsch importiert
    ... die nach MySQL importiert werden ... richtig importiert, mit einer Ausnahme: ... nicht unter "LOAD DATA INFILE"), Google bringt mich mit dem Suchbegriff ...
    (de.comp.datenbanken.mysql)
  • Re: LOAD DATA: NULL im letzten Feld falsch importiert
    ... die nach MySQL importiert werden ... INTO TABLE xxx", ohne weitere Optionen, wird alles ... nicht unter "LOAD DATA INFILE"), Google bringt mich mit dem Suchbegriff ...
    (de.comp.datenbanken.mysql)
  • LOAD DATA LOCAL INFILE
    ... LOAD DATA LOCAL INFILE eingelesen werden. ... The used command is not allowed with this MySQL version (ist ... zu aktivieren, bzw. zu deaktivieren. ...
    (de.comp.datenbanken.mysql)
  • Re: Using MySQL Command Load Data Infile
    ... Or you need an absolute path and stick with LOAD DATA INFILE, ... assuming that the MySQL database is running on the same machine as the ... disk usage analysis tool ...
    (comp.lang.php)
  • Re: [PHP] mysql query and maximum characters in sql statement
    ... Sanjeev N wrote: ... column name are different i cant run the LOAD DATA ... If you're inserting the same data, then use LOAD DATA INFILE to load it ...
    (php.general)