downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

MysqlndUhConnection::setClientOption> <MysqlndUhConnection::setAutocommit
[edit] Last updated: Fri, 24 May 2013

view this page in

MysqlndUhConnection::setCharset

(PECL mysqlnd-uh >= 1.0.0-alpha)

MysqlndUhConnection::setCharsetEstablece el conjunto de caracteres predeterminado del cliente

Descripción

public bool MysqlndUhConnection::setCharset ( mysqlnd_connection $connection , string $charset )

Establece el conjunto de caracteres predeterminado del cliente.

Parámetros

connection

Gestor de conexión de mysqlnd. ¡No modificar!

charset

El conjunto de caracters a establecer como predeterminado.

Valores devueltos

Devuelve TRUE en caso de éxito. De lo contrario, devuelve FALSE

Ejemplos

Ejemplo #1 Ejemplo de MysqlndUhConnection::setCharset()

<?php
class proxy extends MysqlndUhConnection {
 public function 
setCharset($res$charset) {
  
printf("%s(%s)\n"__METHOD__var_export(func_get_args(), true));
  
$ret parent::setCharset($res$charset);
  
printf("%s returns %s\n"__METHOD__var_export($rettrue));
  return 
$ret;
 }
}
mysqlnd_uh_set_connection_proxy(new proxy());
$mysqli = new mysqli("localhost""root""""test");
$mysqli->set_charset("latin1");
?>

El resultado del ejemplo sería:

proxy::setCharset(array (
  0 => NULL,
  1 => 'latin1',
))
proxy::setCharset returns true

Ver también



add a note add a note User Contributed Notes MysqlndUhConnection::setCharset - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites