Rumah > Artikel > pembangunan bahagian belakang > Call to undefined method mysqli:mysqli_query(),该怎么解决
Call to undefined method mysqli::mysqli_query()
出现这样提示:
Fatal error: Call to undefined method mysqli::mysqli_query() in
然后用
print_r(get_extension_funcs('mysqli'));打印mysqli,有mysqli_query函数
会不会是选择语句有问题
$_sql = "select
m.id,
m.admin_user,
m.login_count,
m.last_ip,
m.last_time,
l.level_name
from
cms_manage as m,
cms_level as l
where
l.level = m.level
order by
m.id ASC
limit
0,10";
------解决思路----------------------
你这只是 sql 串,并没有执行
------解决思路----------------------
Call to undefined method mysqli::mysqli_query() 这个报错意味着确实没有mysqli_query函数。虽然你用函数确定了mysqli_query是有的,试试重启下Apache。。。贴出你的具体代码看看
------解决思路----------------------
面向对象的使用方法:
mysqli::query ( string $query [, int $resultmode = MYSQLI_STORE_RESULT ] )
mysqli_query ( mysqli $link , string $query [, int $resultmode = MYSQLI_STORE_RESULT ] )