PHP变量记录集与输出值

mysql_select_db($database_member, $member);
$dizhi= mysql_query("SELECT * FROM member WHERE username like '"+ $row_Recordset1['articles_author'] +"'");
$row = mysql_fetch_array($dizhi);
结果报错了
mysql_fetch_array(): supplied argument is not a valid MySQL result resource
求解决办法

2个回答

 $dizhi= mysql_query("SELECT * FROM member WHERE username like '"+ $row_Recordset1['articles_author'] +"'");
 $dizhi= mysql_query("SELECT * FROM member WHERE username like '". $row_Recordset1['articles_author'] ."'");

字符串连接符是 . 而不是 +

$dizhi= mysql_query(...) or die(mysql_error);
调试一下。通常是SQL语句出错了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问