4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: MrAndrew 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?
-
....This is line in db_mysql:
function get_numrows($query_id = -1) {
if ($query_id != -1) {
$this->query_id = $query_id;
}
[b] return mysql_num_rows($this->query_id);[/b]
}
What is the problem?
[ b] return mysql_num_rows($this->query_id); [/b]
remove the "bold" tags..
mfg Andi
-
Oh, no. It`s only in this topic. I just wanted to mark the line 116 :D
-
It seems you've installed multi-lightboxes mod, I could only assume the error is coming from an error during installation. check every step.
-
Thanks. This was my mistake. Reinstall solved problem.
Why i have this links to detailed pictures from lightbox?
http://domain/img952.lightbox.htm
-
So next/previous images would be from your lightbox and not from the category the image is. This is the same as when you search for images.
-
But this is not correct for me and directing to unknown page
-
related to SEO mod you've installed. search that topic for an answer, I'm sure it's been asked and answered before.
-
Thank you very much for navigation! Will search :-)