note 70542 added to function.mysql-client-encoding

From: Date: Fri, 20 Oct 2006 03:04:54 +0000
Subject: note 70542 added to function.mysql-client-encoding
Groups: php.notes 
Request: Send a blank email to php-notes+get-118812@lists.php.net to get a copy of this message
as i test the below code. i found mysql_client_encoding can't get the correct client encoding. <?php $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); mysql_select_db(DB_NAME,$link); if(!mysql_query("SET NAMES 'BIG5'",$link)) echo "Error"; $result = mysql_query('SHOW VARIABLES',$link); while ($row = mysql_fetch_assoc($result)) { echo $row['Variable_name'] . ' = ' . $row['Value'] . "\n<BR>"; } printf ("Current character set is %s\n", mysql_client_encoding($link)); ?> version_comment = FreeBSD port: mysql-server-5.0.24a version_compile_machine = i386 version_compile_os = portbld-freebsd6.2 ---- Server IP: 140.112.2.5 Probable Submitter: 61.62.20.249 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-client-encoding.php Edit -- https://master.php.net/note/edit/70542 Del: integrated -- https://master.php.net/note/delete/70542/integrated Del: useless -- https://master.php.net/note/delete/70542/useless Del: bad code -- https://master.php.net/note/delete/70542/bad+code Del: spam -- https://master.php.net/note/delete/70542/spam Del: non-english -- https://master.php.net/note/delete/70542/non-english Del: in docs -- https://master.php.net/note/delete/70542/in+docs Del: other reasons-- https://master.php.net/note/delete/70542 Reject -- https://master.php.net/note/reject/70542 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118812) next »