MySQL Forums
Forum List  »  GIS

Re: Can not input CSV file with WKT into mysql
Posted by: lee light
Date: February 13, 2007 06:27AM

$servername = 'localhost';
$username = 'root';
$password = 'test';
$dbname = 'geometry';


$connect = mysql_connect($servername, $username , $password);


$sql = "LOAD DATA INFILE 'data.csv' INTO TABLE '$dbname' FIELDS TERMINATED BY ';'
(id , @geom ) SET geom = GeomFromText(@geom);";

$result = mysql_query($sql, $connect);

if (!$result)
echo mysql_error($connect);


Thank you!!
I have test your idea, but it doesnt work.

Options: ReplyQuote


Subject
Views
Written By
Posted
5654
February 02, 2007 04:27PM
Re: Can not input CSV file with WKT into mysql
3083
February 13, 2007 06:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.