Re: MySQL and loading infiles

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

 



i hope i understand what you're saying, but if not, please forgive me :)

>  mysql_init()
>  mysql_options()
>  mysql_real_connect()

those are not actually php functions, as you'll see if you go to
http://www.php.net/manual/en/ref.mysql.php

what line is actually returning that error? i don't think it has anything to
do with the connect function you have in php, because obviously it's
connecting. if it wasn't, mysql wouldn't be able to return that error in the
first place. what other mysql functions/queries do you have in your code?

-jake



"Mark Gomez" <gomez.mark@saugov.sa.gov.au> wrote in message
news:D34DE75EDDB2D511BFB60008C70D6DD906925588@sagemsg0004.sagemsmrd01.sa.gov
.au...
>
> 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