msql_tablename

(PHP 3, PHP 4 , PHP 5)

msql_tablename -- フィールドのテーブル名を得ます

説明

string msql_tablename ( int query_identifier, int field)

msql_tablename()は、msql_list_tables ()より返された結果ポインタおよび整数インデックスを引数として、 テーブルの名前を返します。 結果ポインタにおけるテーブルの数を求めるために msql_numrows() 関数を使用することができます。

例 1. msql_tablename()の例

<?php
msql_connect
("localhost");
$result = msql_list_tables ("wisconsin");
$i = 0;
while (
$i < msql_numrows ($result)) {
    
$tb_names[$i] = msql_tablename ($result, $i);
    echo
$tb_names[$i] . "<BR>";
    
$i++;
}
?>