mysql_tablename
(PHP 3, PHP 4, PHP 5)
mysql_tablename -- フィールドのテーブル名を得る
説明
string
mysql_tablename ( int result, int i )
mysql_tablename()は、
mysql_list_tables()関数より返された結果ポイン
タおよび整数インデックスを引数とし、テーブルの名前を返します。
結果ポインタにおけるテーブルの数を定義するために
mysql_num_rows()関数を使用することができます。
例 1. mysql_tablename()の例
<?php mysql_connect ("localhost:3306"); $result = mysql_list_tables ("wisconsin"); $i = 0; while ($i < mysql_num_rows ($result)) { $tb_names[$i] = mysql_tablename ($result, $i); echo $tb_names[$i] . "<BR>"; $i++; } ?>
|
|