Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: maxdb_info - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net

search for in the

maxdb_init" width="11" height="7"/> <maxdb_get_server_version
Last updated: Wed, 01 Nov 2006
view this page in

maxdb_info

(PECL)

maxdb_info

(no version information, might be only in CVS)

maxdb->info -- 直近に実行したクエリについての情報を取得する

説明

手続き型

string maxdb_info ( resource link )

オブジェクト指向型 (プロパティ)

class maxdb {

string info

}

maxdb_info() は、最後に実行されたクエリについての情報を 文字列で返します。文字列の内容は、以下のようになります。

表 1. maxdb_info の返す値

クエリの型返される文字列の例
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

注意: 上のいずれにもあてはまらない形式のクエリはサポートされていません。 そのような場合、maxdb_info() は空の文字列を返します。

返り値

直近に実行されたクエリについての追加情報を表す文字列を返します。

例 1. オブジェクト指向型

<?php
$maxdb
= new maxdb("localhost", "MONA", "RED", "DEMODB");

/* 接続を調べます */
if (maxdb_connect_errno()) {
  
printf("接続に失敗しました: %s\n", maxdb_connect_error());
   exit();
}

$maxdb->query("CREATE TABLE temp.t1 LIKE hotel.city");

/* INSERT INTO .. SELECT */
$maxdb->query("INSERT INTO temp.t1 SELECT * FROM hotel.city");
printf("%s\n", $maxdb->info);

/* 接続を閉じます */
$maxdb->close();
?>

例 2. 手続き型

<?php
$link
= maxdb_connect("localhost", "MONA", "RED", "DEMODB");

/* 接続を調べます */
if (maxdb_connect_errno()) {
  
printf("接続に失敗しました: %s\n", maxdb_connect_error());
   exit();
}

maxdb_query($link, "CREATE TABLE temp.t1 LIKE hotel.city");

/* INSERT INTO .. SELECT */
maxdb_query($link, "INSERT INTO temp.t1 SELECT * FROM hotel.city");
printf("%s\n", maxdb_info($link));

/* 接続を閉じます */
maxdb_close($link);
?>

上の例の出力は、たとえば以下のようになります。

Records: 25 Duplicates: 0 Warnings: 0


add a note add a note User Contributed Notes
maxdb_info
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites