(PHP 4, PHP 5)
mysql_tablename — 取得表名
$result
, int $i
)
mysql_tablename() 接受 mysql_list_tables() 返回的结果指针以及一个整数索引作为参数并返回表名。可以用 mysql_num_rows() 函数来判断结果指针中的表的数目。用 mysql_tablename() 函数来遍历此结果指针,或者任何处理结果表的函数,例如 mysql_fetch_array()。
Example #1 mysql_tablename() 例子
<?php
mysql_connect("localhost", "mysql_user", "mysql_password");
$result = mysql_list_tables("mydb");
for ($i = 0; $i < mysql_num_rows($result); $i++)
printf ("Table: %sn", mysql_tablename($result, $i));
mysql_free_result($result);
?>
参见 mysql_list_tables()。
PHP:MySQL函数mysql_error()的用法
mysql_error(PHP4,PHP5)mysql_error返回上一个MySQL操作产生的文本错误信息说明stringmysql_error([resource$link_identifier])返回上一个MySQL函数的错误文本,如果没有出错
PHP:MySQL函数mysql_fetch_lengths()的用法
mysql_fetch_lengths(PHP4,PHP5)mysql_fetch_lengths取得结果集中每个输出的长度说明arraymysql_fetch_lengths(resource$result)以数组返回上一次用mysql_fetch_row()取得的行中每个
PHP:MySQL函数mysql_fetch_lengths()的用法
mysql_fetch_lengths(PHP4,PHP5)mysql_fetch_lengths取得结果集中每个输出的长度说明arraymysql_fetch_lengths(resource$result)以数组返回上一次用mysql_fetch_row()取得的行中每个