mysql_fetch_array():提供的参数不是有效的 MySQL
$idc = $_GET['id'];
$name1 = $_GET['name'];
$id2 = $_GET['ids'];
$toplinks = "";
if (isset($_SESSION['category_id'])) {
// Put stored session variables into local php variable
$userid = $_SESSION['id'];
$username = $_SESSION['name'];
}
$sql_2 = mysql_query("SELECT * FROM blabbing WHERE mem_id='$userid' OR men_id='$idc' ORDER BY blab_date DESC LIMIT 20")
while($row = mysql_fetch_array($sql_2)){
}
$idc = $_GET['id'];
$name1 = $_GET['name'];
$id2 = $_GET['ids'];
$toplinks = "";
if (isset($_SESSION['category_id'])) {
// Put stored session variables into local php variable
$userid = $_SESSION['id'];
$username = $_SESSION['name'];
}
$sql_2 = mysql_query("SELECT * FROM blabbing WHERE mem_id='$userid' OR men_id='$idc' ORDER BY blab_date DESC LIMIT 20")
while($row = mysql_fetch_array($sql_2)){
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您的查询中有错误...您参考
mem_id
然后 ORmen_id
尝试添加
or die ( mysql_error () );
到 mysql_query 行。IE
I think there is an error in your query ... you refer to
mem_id
and then ORmen_id
Try adding
or die ( mysql_error () );
to the mysql_query line.i.e.
你先
mysql_connect
了吗?Did you
mysql_connect
first?