ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:setcharset

setCharSet

Support for this command is limited to MySQL and Postgres databases, and as of ADOdb V5.21, this method is deprecated for MySQL databases, use setConnectionParameter() instead. Because Postgres allows the character set to be modified in real-time, it can be used at any point in the script after a connection has been established.

Syntax
 bool function setCharSet(
      string $characterSetName
      )
      

Description

The function setCharSet() set the client side character set to the specified set. The function returns true or false based on the success of command execution.

See getCharSet().

Usage

$db->setCharset('utf8');
v5/reference/connection/setcharset.txt · Last modified: 2022/07/13 03:18 by mnewnham