23
« on: October 17, 2010, 12:23:37 PM »
I got next error:
An unexpected error occured. Please try again later.
Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_active, i.image_media_file, i.image_thumb_file, c.cat_name, u.user_name
FROM (5images_images i, 5images_categories c)
LEFT JOIN 5images_users u ON (u.user_id = i.user_id)
WHERE image_active = 1 AND image_id IN () AND c.cat_id = i.cat_id AND i.cat_id NOT IN (0)
ORDER BY image_date DESC, i.image_id DESC
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND c.cat_id = i.cat_id AND i.cat_id NOT IN (0)
ORDER BY image_date DE' at line 4
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\Users\Andrew\Desktop\skyphotos.local\www\includes\db_mysql.php on line 116
This is line in lightbox:
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN (".USERS_TABLE." u) ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND i.image_id IN ($image_id_sql) AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
ORDER BY i.".$config['image_order']." ".$config['image_sort'].", i.image_id ".$config['image_sort']."
LIMIT $offset, $perpage";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
This is line in db_mysql:
function get_numrows($query_id = -1) {
if ($query_id != -1) {
$this->query_id = $query_id;
}
return mysql_num_rows($this->query_id);
}
What is the problem?