MySQL and loading infiles

From: Date: Thu, 24 Apr 2003 03:41:23 +0000
Subject: MySQL and loading infiles
Groups: php.db 
Request: Send a blank email to php-db+get-27323@lists.php.net to get a copy of this message
Hi, I am having a problem with the latest PHP 4 upgrade recently. My page was successfully loading a csv text file into MySQL database in the previous versions of PHP 4. Since the upgrade we get MySQL error: ERROR 1148: The used command is not allowed with this MySQL version Researching this error, the MySQL site indicates setting --local-infile option on the database or on the client. Using MySQL client and setting this option I can load the file. I would like to set this option in the PHP page. My pages currently connect using: $dbh = mysql_connect("host","database","user","password") or die mysql_error()); $sdbh = mysql_select_db("database") or die (mysql_error()); Reading the MySQL site, I should connect using the following functions: mysql_init() mysql_options() mysql_real_connect() I must admit that am I new to PHP, and can not get these functions to work. I could not find any PHP doco relating to these functions. Are they supported by PHP? Is there any PHP examples/doco anywhere? Thanks Mark

« previous php.db (#27323) next »