我爱Aspx >> 数据库 >> MySQL数据库函数详解(5)MySQL数据库函数详解(5)
OSO奥索(17) string mysql_field_table(int result_id, int col_num);
返回结果集给定列的表名。对于计算列,此名为空。
col_num的范围为0到mysql_num_fields()-1.
<?php
$link=mysql_pconnect("localhost","sunsoft","suixiang") or die("Could not connect");
mysql_select_db("stamp_db");
$query="SELECT * FROM president";
$result=mysql_query($query) or die("Query failed");
for($i=0;$i<mysql_num_fields($result);$i++)
{
print("column $d:",$i);
printf("Name %s
",mysql_field_name($result,$i));
printf("Table %s
",mysql_field_nmae($result,$i));
print"<BR>
";
?>
(18) string mysql_field_type(int result_id, int col_num);
返回结果集给定列的类型名。类型名敬请等待参考本人的另外“MySQL列类型参考”。
【我对这篇文章有话说?】
Sql连接查询[05-22]
Sql联合查询[05-22]
mysql使用指南(上)[05-22]
MYSQL使用指南(下)[05-22]
精通数据库系列之入门-基础篇1[05-22]
精通数据库系列之入门-基础篇2[05-22]
精通数据库系列之入门-技巧篇1[05-22]
精通数据库系列之入门-技巧篇3[05-22]
精通数据库系列之入门-技巧篇4[05-22]
精通数据库系列之入门-技巧篇5[05-22]
Sql连接查询[05-22]
Sql联合查询[05-22]
mysql使用指南(上)[05-22]
MYSQL使用指南(下)[05-22]
精通数据库系列之入门-基础篇1[05-22]
精通数据库系列之入门-基础篇2[05-22]
精通数据库系列之入门-技巧篇1[05-22]
精通数据库系列之入门-技巧篇3[05-22]
精通数据库系列之入门-技巧篇4[05-22]
精通数据库系列之入门-技巧篇5[05-22]