Re: CSV to PHPmyAdmin - Need Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It should be   INSERT into table     rather than   REPLACE into


--- In php-objects@xxxxxxxxxxxxxxx, "Vishal Subandh" 
<vishal.subandh@...> wrote:
>
> Hi folks,
> 
> I have an excel sheet with approximately 48 collumns and 48 rows. I
> have converted that file to CSV format.
> 
> All that I need is a simple MySQL query that uploads this data from
> the CSV to PHPMyAdmin. I am currently using the query stated below 
but
> it does not work efficiently for me. Do you guys recomend any
> alterations or poropose a new approach to wirte the query stated
> below.
> 
> mysql_query('LOAD DATA LOCAL INFILE "test.csv" REPLACE INTO TABLE 
user
> FIELDS TERMINATED BY "," LINES TERMINATED BY "\\r\\n";') or die
('Error
> loading data file.<br>' . mysql_error());
> 
> Appreciate your help
> 
> Kind regards,
> 
> Vishal
>



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux