include 'phpstudy/';
mysql_select_db(DBNAME,$link) or die(mysql_error());

This will give you the errors if any.


"Jack" <[EMAIL PROTECTED]> wrote in message
> Dear all
> I had a problem to get the php to load a csv file into mysql.
> I had a csv file which located at my HDD, and i had tried to Import the
> from this CSV file into mysql using MYCC which is a console program for
> mysql, it successfully load the data into mysql table.
> Now i try to setup my webpage, which tried to perform same task is to load
> that csv file's data into mysql table, but it won't work!! don't know
> here is my php code.
>   <?
> include 'phpstudy/';
> $link=mysql_pconnect(HOST,USER,PASSWD);
> mysql_select_db(DBNAME,$link);
> print ($select);
> if ($select =="HKD RATE")
> {
> $importquery= "LOAD DATA LOCAL INFILE 'C:/Documents and
> Settings/jack/Desktop/Web/test/hkd_rate.csv' into hkd_depsit1 fields
> terminated by ',' ";
> $resultimportquery=mysql_query($importquery,$link);
> print ($result);
> }
> ?>
> when i run this script, it doesn't load the data into mysql! but as i said
> before, using the same query in MYCC, i can successfully load the data
> Mysql database.
> Could someone pls tell me what mistake i had made?
> --
> Thx a lot!
> Jack

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to