站长学堂
你的位置: 中国个人站长站 -- 站长学堂 -- 数据库 -- MySQL教程 -- 文章正文 MySQL数据库函数详解(5)
推荐位

MySQL数据库函数详解(5)

中国个人站长站 MySQL教程 点击数: 更新时间:2005-3-12 9:19:08
_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>
";
}
?>


上一页  [1] [2] 

SQL爱好者 网友投稿 文章录入:swh    责任编辑:swh 
个人站长站与你风雨同舟!
本站所提供的资源均来源于互联网,如有侵权行为,请与本站管理员联系,我们会第一时间删除!
·如果您发现《MySQL数据库函数详解(5)》文章有错误,也请通知我们修改!
联系邮箱chinageren#126.com,谢谢支持!
站内搜索:
广告服务 | 友情链接 | 联系我们 | 免责声明 | 用户留言 | 网站导航
版权所有:中国个人站长站 2007-2008 未经授权禁止复制或建立镜像 客服QQ号:112731235
copyright © 2007-2008 www.ChinaGeRen.com online services. all rights reserved. 苏ICP备05000059号