mysqli::$info

mysqli_info

(PHP 5, PHP 7)

mysqli::$info -- mysqli_info锟斤拷锟斤拷锟斤拷锟街达拷械锟� SQL 锟斤拷锟斤拷锟斤拷息

说锟斤拷

锟斤拷锟斤拷锟斤拷锟斤拷锟�

锟斤拷锟教伙拷锟斤拷锟�

mysqli_info ( mysqli $link ) : string

mysqli_info() 锟斤拷锟斤拷锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷 锟斤拷锟街达拷械锟� SQL 锟斤拷锟斤拷锟较拷锟斤拷址锟斤拷锟斤拷锟� 锟斤拷锟斤拷锟斤拷一些锟轿匡拷锟斤拷锟斤拷锟斤拷

mysqli_info 锟斤拷锟杰的凤拷锟斤拷值
SQL 锟斤拷锟斤拷锟斤拷锟� 锟斤拷锟截斤拷锟斤拷址锟斤拷锟绞撅拷锟�
INSERT INTO...SELECT... Records: 100 Duplicates: 0 Warnings: 0
INSERT INTO...VALUES (...),(...),(...) Records: 3 Duplicates: 0 Warnings: 0
LOAD DATA INFILE ... Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
ALTER TABLE ... Records: 3 Duplicates: 0 Warnings: 0
UPDATE ... Rows matched: 40 Changed: 40 Warnings: 0

Note:

锟斤拷锟斤拷锟街达拷械锟� SQL 锟斤拷洳伙拷锟斤拷锟斤拷锟斤拷谐锟斤拷锟斤拷锟斤拷饧革拷锟斤拷锟斤拷偷模锟� mysqli_info() 锟斤拷锟斤拷锟结返锟斤拷一锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷

锟斤拷锟斤拷

link

锟斤拷锟皆癸拷锟教伙拷锟斤拷式锟斤拷锟斤拷mysqli_connect() 锟斤拷 mysqli_init() 锟斤拷锟截碉拷锟斤拷锟接憋拷识锟斤拷

锟斤拷锟斤拷值

锟斤拷锟街达拷械锟� SQL 锟斤拷锟斤拷锟斤拷锟斤拷锟较拷锟�

锟斤拷锟斤拷

Example #1 $mysqli->info 锟斤拷锟斤拷

锟斤拷锟斤拷锟斤拷锟斤拷锟�

<?php
$mysqli 
= new mysqli("localhost""my_user""my_password""world");

/* 锟斤拷锟斤拷锟斤拷锟� */
if (mysqli_connect_errno()) {
    
printf("Connect failed: %s\n"mysqli_connect_error());
    exit();
}

$mysqli->query("CREATE TEMPORARY TABLE t1 LIKE City");

/* INSERT INTO .. SELECT */
$mysqli->query("INSERT INTO t1 SELECT * FROM City ORDER BY ID LIMIT 150");
printf("%s\n"$mysqli->info);

/* 锟截憋拷锟斤拷锟斤拷 */
$mysqli->close();
?>

锟斤拷锟教伙拷锟斤拷锟�

<?php
$link 
mysqli_connect("localhost""my_user""my_password""world");

/* 锟斤拷锟斤拷锟斤拷锟� */
if (mysqli_connect_errno()) {
    
printf("Connect failed: %s\n"mysqli_connect_error());
    exit();
}

mysqli_query($link"CREATE TEMPORARY TABLE t1 LIKE City");

/* INSERT INTO .. SELECT */
mysqli_query($link"INSERT INTO t1 SELECT * FROM City ORDER BY ID LIMIT 150");
printf("%s\n"mysqli_info($link));

/* 锟截憋拷锟斤拷锟斤拷 */
mysqli_close($link);
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

Records: 150  Duplicates: 0  Warnings: 0

锟轿硷拷