Helo everyone !
I find this problem and I think I am close to the solution but ...
The question: I need to import a few thousand of record storee in a *.csv
file on my local harddisk, with my php application, managing my mysql engine.
So, in command line, all works fine, all records are
I could be 100% wrong on this, but I do not think that a command line
statement can be executed through mysql_query() - try exec().
If I remember correctly mysql load data infile ... is not executed from
within mysql, but at the command line.
(Hint: look at the source for phpMyAdmin and copy
You can definitely do a load file from within the mysql client, so I'd
guess you can do it through mysql_query, too. I'm wondering about the
semi-colon within the query. Maybe it needs to be escaped, too.
David
I could be 100% wrong on this, but I do not think that a command line
statement
where you open
the file and read it in, parsing thru it to access the data elements and
running sql statements thru a loop
Bastien
From: [EMAIL PROTECTED]
To: Miles Thompson [EMAIL PROTECTED]
CC: php-db-list php-db@lists.php.net
Subject: Re: [PHP-DB] load data infile -- problem
Date: Thu, 18
Hello
I'm new to this list. I diden't found anything in the archive and by
googleing to solve my problem.
We have updated our server to PHP 4.3.8 and MySQL 4.0.2. Some of our
clients run a shop software that need 'LOAD DATA LOCAL INFILE' to store
its data to MySQL. MySQL itself supports the
Hi there everyone,
I'm having a problem loading in a text file, each column is enclosed with a
and separated by a , but when I try the below, it loads in the data BUT it
puts a to the left of each character.
Any help would be really appreciated.
Thank you
Chris
Hello,
I have a page with a button that when clicked loads a pre-determined
text file into my database. The code is posted below.
However, when clicked the button does nothing, just opens up the same
page again. The data does not get loaded into the database. any ideas?
Thanks
Justin
The
]
Subject: Re: [PHP-DB] Load data infile problem
does your server have the post variables set as globals? you might
have to use $_POST['submit'] instead.
On Jun 7, 2004, at 9:17 PM, [EMAIL PROTECTED] wrote:
Hello,
I have a page with a button that when clicked loads a pre-determined
text file
when using the 'load data infile' commands how do i force the data
thats being loaded to completely be loaded
ie
LOAD DATA INFILE data.txt INTO TABLE datacontent.misc_code;
I have a file eg: data.txt thats 36 lines long, but is full of misc
text including some php + mysql code, so its not
hi, could you help me?
i have got this php code
$importfilename = $importdir_web . $importfile;
echo $importfilename . 'br';
$vysledekupdate = MySQL_DB_Query($dbname,LOAD DATA LOCAL INFILE
'$importfilename' INTO TABLE shop_rates FIELDS TERMINATED BY ';' LINES
TERMINATED BY '\r\n');
if
Hi to all,
I changed Linux from version 7.2 to 7.3 and now when I try to load data
using LOAD DATA LOCAL INFILE I got the following error:
The used command is not allowed with this MySQL version. I
enable --local-infile=1 But I'm still getting the same error.
Any help, is greatly appreciate it
On Monday 15 July 2002 22:03, Natividad Castro wrote:
Hi to all,
I changed Linux from version 7.2 to 7.3 and now when I try to load data
using LOAD DATA LOCAL INFILE I got the following error:
The used command is not allowed with this MySQL version. I
enable --local-infile=1 But I'm still
Hi to all,
I changed Linux from version 7.2 to 7.3 and now when I try to load data
using LOAD DATA LOCAL INFILE I got the following error:
The used command is not allowed with this MySQL version. I
enable --local-infile=1 But I'm still getting the same error.
Any help, is greatly appreciate it
I have a called file cats.txt which count data that were solitary of a DB
Access.
I need to export these data for a table 'cats' inside of a DB done in MySql.
In MySql I can execute this procedure in the following way:
Load data local infile gatos.txt
into table gatos
fields
terminated by ','
You running Windows or *nix? File permissions will play a part in this,
but use PHP's exec() function to execute MySQL's load data infile. The
manual has a number of well annotated examples. The big problem may be that
you'll be executing the command as whatever user the web server is running
Every time I use the command
LOAD DATA LOCAL INFILE C:WINDOWS:Desktop:db.txt INTO TABLE booktest;
I get this error message...
ERROR:
File 'C:WINDOWS:Desktop:db.txt' not found (Errcode: 2)
How can I load my file to the database???
--Will
I may be not understanding properly without checking your MySQL syntax, but
should it not be C:\WINDOWS\Desktop\db.txt?
Tom
At 08:53 10/07/2001 -0500, you wrote:
Every time I use the command
LOAD DATA LOCAL INFILE C:WINDOWS:Desktop:db.txt INTO TABLE booktest;
I get this error message...
I get *.csv file like this (1 string):
7,'Markovic Stevo','NULL','NULL'
When I use LOAD DATA INFILE syntax I get word NULL in cell (MySQL table)
q: I want cell to be empty (in table), where the NULL is (in *.csv), how?
tomaz, Slovenia
18 matches
Mail list logo