Forum und email

mysql_info

(PHP 4 >= 4.3.0, PHP 5, PECL mysql:1.0)

mysql_info — 가장 최근 질의에 대한 정보를 반환

설명

string mysql_info ([ resource $link_identifier ] )

최근 질의에 대한 상세한 정보를 반환한다.

매개변수

link_identifier

MySQL 연결. 지정하지 않으면 mysql_connect()로 연 마지막 연결을 사용합니다. 연결이 없으면, 매개변수 없이 mysql_connect()를 호출하여 연결을 만듭니다. 연결이 성립되지 않으면 E_WARNING 경고를 생성합니다.

반환값

성공하면 진술문(statement) 정보를, 실패하면 FALSE를 반환한다. 진술문이 제공하는 정보와 반환되는 값이 어떻게 보여지는지 아래의 예제를 참고하라. 진술문은 FALSE를 반환하는 Returns information about the statement on success, or FALSE on failure. See the example below for which statements provide information, and what the returned value may look like. Statements that aren't listed will return FALSE

예제

Example#1 관련된 MySQL 진술문

진술문은 문자열로 반환된다. 숫자들은 질의와 관련된 값이며 설명을 목적으로한 용도이다.

INSERT INTO ... SELECT ...
String format: Records: 23 Duplicates: 0 Warnings: 0 
INSERT INTO ... VALUES (...),(...),(...)...
String format: Records: 37 Duplicates: 0 Warnings: 0 
LOAD DATA INFILE ...
String format: Records: 42 Deleted: 0 Skipped: 0 Warnings: 0 
ALTER TABLE
String format: Records: 60 Duplicates: 0 Warnings: 0 
UPDATE
String format: Rows matched: 65 Changed: 65 Warnings: 0

주의

Note: 다중 값 목록이 기술된 INSERT ... VALUES 구문에서 mysql_info()FALSE가 아닌 값을 반환한다.