Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我在使用 mysql_fetch_array 时遇到了麻烦。这是我的代码:
$sql=mysql_query("SELECT * FROM members WHERE group='$group'"); $query=mysql_fetch_array($sql);
我收到以下错误:
Warning: mysql_fetch_array() expects parameter 1 to be resource
任何帮助都会非常有用
group 是一个 mysql 函数,你必须用 ` 将它括起来,这样 mysql 就知道它是一个名称而不是函数。像这样:
$sql=mysql_query("SELECT * FROM members WHERE `group`='$group'"); $query=mysql_fetch_array($sql);