MySQL数据库函数详解
来源:互联网 发布:unity3d 皮影人 编辑:程序博客网 时间:2024/05/20 06:50
(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列类型参考”。
col_num的范围为0到MySQL_num_fields()-1.
<?php
$link=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++)
{
printf("colum %d:",$i);
printf("Name %s,
",MySQL_field_name($result,$i));
printf("Type %s
",MySQL_field_type($result,$i));
}
?>
(19) string MySQL_field_flags(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 * FORM member";
$result=MySQL_query($query) or die("Query failed");
for($i=0;$i<MySQL_num_fields($result);$i++)
{
printf("column %d:",$i);
printf("Name %s,
",MySQL_fields_name($result,$i));
printf("Flags %s
",MySQL_fields_flags($result,$i));
}
?>
(20) int MySQL_field_len(int result, int field_offset);
返回结果集给定列中值可能的最大长度。
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 member";
$result=MySQL_query($query) or die("Query failed");
for($i=0;$i<MySQL_num_fields($result);$i++)
{
printf("Column %d:",$i);
printf("Name %s,
",MySQL_field_name($result,$i));
printf("Len %d
",MySQL_field_len($result,$i));
print"<BR>
";
}
?>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- MySQL数据库函数详解
- MySQL数据库函数详解
- MySQL数据库函数详解(5)
- MySQL数据库函数详解(5)
- MySQL数据库函数详解(4)
- MySQL数据库函数详解(3)
- MySQL数据库函数详解(2)
- MySQL数据库函数详解(1)
- PHP4与MySQL数据库操作函数详解
- PHP4与MySQL数据库操作函数详解
- MySQL数据库的FIND_IN_SET函数使用方法详解
- PHP与MySQL数据库操作函数详解
- PHP4与MySQL数据库操作函数详解(六)
- PHP4与MySQL数据库操作函数详解(五)
- PHP4与MySQL数据库操作函数详解(四)
- PHP4与MySQL数据库操作函数详解(三)
- PHP4与MySQL数据库操作函数详解(二)
- PHP4与MySQL数据库操作函数详解(一)
- 从一个MysqL的例子来学习查询语句
- 样式表CSS中div、span和center元素
- MySQL数据库函数详解(4)
- 样式表(CSS:CascadingStyleSheets)学习[上]
- DLL 應用 - 設計可抽換的模組
- MySQL数据库函数详解
- 阴影效果滤镜DropShadow颜色数值
- Adapter 樣式
- MySQL数据库函数详解(3)
- 常用CSS2基本定义例子
- 启动外部程序并等待它结束
- MySQL数据库函数详解(2)
- web标准,我们去向何方?
- MySQL数据库函数详解(1)