커피와 개발자

[MySQL API] mysql_set_charset() 본문

데이터베이스/SQL

[MySQL API] mysql_set_charset()

광박이 2011. 3. 3. 14:40
728x90
Sets the client character set
【형식】
      mysql_set_charset ( string $charset [, resource $link_identifier ] )
Sets the default character set for the current connection. 

charset

A valid character set name.

link_identifier

MySQL 연결. 지정하지 않으면 mysql_connect()로 연 마지막 연결을 사용한다. 연결이 없으면, 인수 없이 mysql_connect()를 호출하여 연결을 만든다. 연결이 성립되지 않으면 E_WARNING 등급의 오류를 생성한다.

반환값

성공할 경우 TRUE를, 실패할 경우 FALSE를 반환한다.

주의

Note: This function requires MySQL 5.0.7 or later.

Note: This is the preferred way to change the charset. Using mysql_query() to execute SET NAMES .. is not recommended.

728x90

'데이터베이스 > SQL' 카테고리의 다른 글

[MySQL API] mysql_unbuffered_query()  (0) 2011.03.03
[MySQL API] mysql_stat()  (0) 2011.03.03
[MySQL API] mysql_result()  (0) 2011.03.03
[MySQL API] mysql_real_escape_string()  (0) 2011.03.03
[MySQL API] mysql_query()  (0) 2011.03.03
Comments