PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

MysqlndUhConnection::listFields - List MySQL table fields | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

MysqlndUhConnection::listFields

(PECL mysqlnd-uh >= 1.0.0-alpha)

MysqlndUhConnection::listFieldsList MySQL table fields

説明

public array MysqlndUhConnection::listFields ( mysqlnd_connection $connection , string $table , string $achtung_wild )

List MySQL table fields.

警告

この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。

パラメータ

connection

Mysqlnd connection handle. Do not modify!

table

The name of the table that's being queried.

pattern

Name pattern.

返り値

例1 MysqlndUhConnection::listFields() example

<?php
class proxy extends MysqlndUhConnection {
 public function 
listFields($res$table$pattern) {
  
printf("%s(%s)\n"__METHOD__var_export(func_get_args(), true));
  
$ret parent::listFields($res$table$pattern);
  
printf("%s returns %s\n"__METHOD__var_export($rettrue));
  return 
$ret;
 }
}
mysqlnd_uh_set_connection_proxy(new proxy());

$mysql mysql_connect("localhost""root""");
mysql_select_db("test"$mysql);
mysql_query("DROP TABLE IF EXISTS test_a"$mysql);
mysql_query("CREATE TABLE test_a(id INT, col1 VARCHAR(255))"$mysql);
$res mysql_list_fields("test""test_a"$mysql);
printf("num_rows = %d\n"mysql_num_rows($res));
while (
$row mysql_fetch_assoc($res))
 
var_dump($row);
?>

上の例の出力は以下となります。

proxy::listFields(array (
  0 => NULL,
  1 => 'test_a',
  2 => '',
))
proxy::listFields returns NULL
num_rows = 0

参考


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「MysqlndUhConnection::listFields - List MySQL table fields」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | MysqlndUhConnection::listFields - List MySQL table fields」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: