PHP函数mysql_field_type介绍
定义和用法
mysql_field_type() 函数返回结果集中指定字段的类型。
如果成功,则返回指定字段的类型,如果失败,则返回 false。
语法
mysql_field_type(data,field_offset)
例子
<?php$con = mysql_connect("localhost", "hello", "321");if (!$con) { die(Could not connect: . mysql_error()); }$db_selected = mysql_select_db("test_db",$con);$sql = "SELECT * from Person";$result = mysql_query($sql,$con);$type = mysql_field_type($result, 0);echo $type;mysql_close($con);?>
输出:
string
本文出自:琅枫个人博客。如需转载请注明出处!
本文出处:"https://www.phpfeng.cn/function/422.html"
如果您觉得文章对你有帮助,可以进行打赏。
打赏多少,您高兴就行,谢谢您对琅枫博客的支持! ~(@^_^@)~
微信打赏

支付宝打赏
