MySQL and loading infiles

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

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux