Re: cannot use $mysqli->set_charset (undefined method)

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

 



Hi Julien

You will probably find that if you use the procedural coding rather than the object-oriented programming you code will work.

So instead of using:
$mysqli->set_charset("utf8");

use:
mysqli_set_charset("utf8");

Hope this helps

Greg

Julien Ricard - Condenet wrote:

Hello,

here are the versions I'm using :
Apache/2.0.54 (Win32) PHP/5.1.0RC2-dev

The mysqli client api version is : 5.0.13-rc (as written on my phpinfo output)

I can instantiate mysqli with
$mysqli = new mysqli("localhost", "root", "---", "mysql");

But I get an error when I try to set the charset with :
$mysqli->set_charset("utf8");

The error I get is :
Fatal error: Call to undefined method mysqli::set_charset() in ....

I don't know what to do. I tried to reinstall php with the latest builds, did the same thing with mysql...

Any idea ?

Thank you
Julien


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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux