点击注册
(点击注册)
注册会员

中级会员
UID 21197
精华
0
积分 160
帖子 160
金钱 160 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2003-6-30 来自 北京
状态 离线
|
!!!在线的兄弟进来看一看!!!
我用PHP和MYSQL做网页,在查询上出现了错误,下面是我网页的PHP源代码以及错误提示:
$pagesize =5;
$host="MyComputer";
$use="root";
$passwords="";
$test="test";
mysql_connect("$host","$use","$passwords") or die (" roblem connecting to DataBase");
mysql_select_db($test) or die("worng");
$result=mysql_query("select * from luntan where number='$number' ",$test);
$row=mysql_fetch_array($result);
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
错误提示如下:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /usb1/www/why/ping.php on line 35
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usb1/www/why/ping.php on line 36
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
35行指的是$result=mysql_query("select...........)
如果我把where number=$number去掉,就可以顺利的执行,我应该如何修改这个语句呢
请高手指点
|
|