Load data and pathname [SOLVED]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
PHP_mySQL__Newbie
Forum Commoner
Posts: 29
Joined: Fri Aug 12, 2011 5:40 pm

Load data and pathname [SOLVED]

Post by PHP_mySQL__Newbie »

This may be an easy one but I am not able to figue it out. I am trying to load a data file but mysql is not able to recognize the path. What am I missing here?

$sql = "LOAD DATA LOCAL INFILE
'/localhost/Data/Table.txt'
INTO TABLE myTable IGNORE 1 LINES;
";

(Pardon my intrusion with a mySql posting. I am noticing that there are plenty of smart programmers on this forum as compared to other forums where there is not much going on. The posting sits there forever.)
Last edited by PHP_mySQL__Newbie on Wed Aug 17, 2011 1:23 am, edited 1 time in total.
User avatar
PHP_mySQL__Newbie
Forum Commoner
Posts: 29
Joined: Fri Aug 12, 2011 5:40 pm

Re: Load data and pathname

Post by PHP_mySQL__Newbie »

ok. I figured it out.
This worked.

$sql = "LOAD DATA LOCAL INFILE
'http://localhost/Data/Table.txt'
INTO TABLE myTable IGNORE 1 LINES;
Post Reply