Welcome to WebmasterWorld Guest from 18.104.22.168
I have a problem with my web host,
they have a limit on 36000 inserts to my mysql database.
User 'user' has exceeded the 'max_updates' resource (current value: 36000)
This happen when importing a cvs file with 61000 lines.
Then I realized that using phpmyadmin works just fine, using the feature:
Insert data from a text file into the table
phpmyadmin use this command:
LOAD DATA LOCAL INFILE '/tmp/phpTAhBie' INTO TABLE `iptoc` FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'
And here is the strange part, it works perfectly from phpmyadmin, but when doing it myself in a separate php script, then I get this message:
The used command is not allowed with this MySQL version
Here is a part of my code:
$sql = "LOAD DATA LOCAL INFILE '/tmp/phpmyskwi' INTO TABLE `iptoco` FIELDS TERMINATED BY ',' ENCLOSED BY '\"' ESCAPED BY '\\\\' LINES TERMINATED BY '\\r\\n'";
$result = mysql_query($sql, $dblink) or die("load -" . mysql_error());
I've been looking into the phpmyadmin code, and I cannot seem to figure out what they do differently!
Anyone with some insight here that can help me out, or give some tips?
I would like to make a cron job out of this.