我无法让我的无名小卒 Mysql 声明 工作, 它快把我逼疯了:
$ancestors = mysql_query(
SELECT * FROM comments e
WHERE
ancestors = " . $comment["id"] . " AND
user_id != " . $user->user_object["id"] . " AND
NOT EXISTS
(
SELECT null
FROM notifications d
WHERE d.target_id = e.id
)
, $database->connection_handle);
有什么想法吗?
错误:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /<>/<>/functions.php on line 785
第785行:
while($reply = mysql_fetch_array($ancestors, MYSQL_ASSOC)){
如果我这样做:
$ancestors = mysql_query( SELECT * FROM . $database->db_prefix . comments
WHERE
ancestors = " . $comment["id"] . " AND
user_id != " . $user->user_object["id"] . " ,
$database->connection_handle
);
它返回我预期的结果。
通知表是否包含一个条目
i>==================================================================================================================
string(46) "Table whatever_co.comments doesn t exist"
//SOLVED::: . $database->db_prefix . was missing from my table selectors.