PHP用【mysqli】从结果集中取得一行【mysqli_fetch_row()】

//mysqli_fetch_row()的两种用法:
$result=$mysqli->query($sql); //执行SQL语句获得结果集
//mysqli_fetch_row() 函数从结果集中取得一行,并作为枚举数组返回。
第一种:$row = $result->fetch_row(); //注意括号里面不要带参数
第二种:$row = mysqli_fetch_row($result);    //注意括号里面需要传入参数

来源:http://www.thinkphp.cn/topic/42229.html

猜你喜欢

转载自blog.csdn.net/qq_42058441/article/details/83994766