Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


Post subject: Getting charset for database PDO connection

registered: 09/17/2012

IP: *.74.180.145

views: 0

I was able to retrieve the charset for the current connection using the following code:


$get_charset = $connection->query( "SELECT COLLATION('abc')" );

echo $get_charset->fetch( PDO::FETCH_NUM )[0];


You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: