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

From: Date: Mon, 10 Oct 2005 21:48:04 +0000
Subject: Re: cannot use $mysqli->set_charset (undefined method)
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-26392@lists.php.net to get a copy of this message
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


« previous php.windows (#26392) next »