Home > Backend Development > PHP Tutorial > 请教为啥$row=mysql_fetch_array($result);这句老报错

请教为啥$row=mysql_fetch_array($result);这句老报错

WBOY
Release: 2016-06-13 12:48:12
Original
1115 people have browsed it

请问为啥$row=mysql_fetch_array($result);这句老报错啊
$query="select * from users where name='{$_session['Username']}' and Pass='{$_session['Password']}'";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
if ($row)



$row=mysql_fetch_array($result);
上面这句老报错
undefined function mysql_query() 、
谁帮帮啊这菜鸟啊,谢谢了。
我新来的,没什么分可以给,请见谅。


------解决方案--------------------
看你的代码,明显你连接的是ORACLE数据库,但是你用MYSQL的方法来获取查询结果,估计你服务器的PHP没有支持MYSQL。
应该用这个oci_fetch_array()
------解决方案--------------------
oracle 用 oci_fetch_array
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template