PHP函数mysql_field_seek介绍
定义和用法
mysql_field_seek() 函数将结果集中的指针设定为指定的字段偏移量。
如果成功,则返回 true,如果失败,则返回 false。
语法
mysql_field_seek(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);// 跳到第四个字段mysql_field_seek($result,3);print_r(mysql_fetch_field($result));mysql_close($con);?>
输出:
stdClass Object([name] => Age[table] => Person[def] =>[max_length] => 2[not_null] => 0[primary_key] => 0[multiple_key] => 0[unique_key] => 0[numeric] => 1[blob] => 0[type] => int[unsigned] => 0[zerofill] => 0)
本文出自:琅枫个人博客。如需转载请注明出处!
本文出处:"https://www.langfujun.top/function/420.html"
如果您觉得文章对你有帮助,可以进行打赏。
打赏多少,您高兴就行,谢谢您对琅枫博客的支持! ~(@^_^@)~
微信打赏

支付宝打赏
