Author Topic: Error in lightbox page  (Read 7022 times)

0 Members and 1 Guest are viewing this topic.

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Error in lightbox page
« on: October 17, 2010, 12:23:37 PM »
I got next error:

An unexpected error occured. Please try again later.

Code: [Select]
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?
« Last Edit: October 17, 2010, 01:48:50 PM by MrAndrew »

Rembrandt

  • Guest
Re: Error in lightbox page
« Reply #1 on: October 17, 2010, 01:19:21 PM »
....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

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: Error in lightbox page
« Reply #2 on: October 17, 2010, 01:47:56 PM »
Oh, no. It`s only in this topic. I just wanted to mark the line 116  :D

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error in lightbox page
« Reply #3 on: October 17, 2010, 08:58:50 PM »
It seems you've installed multi-lightboxes mod, I could only assume the error is coming from an error during installation. check every step.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: Error in lightbox page
« Reply #4 on: October 17, 2010, 10:24:38 PM »
Thanks. This was my mistake. Reinstall solved problem.

Why i have this links to detailed pictures from lightbox?

Code: [Select]
http://domain/img952.lightbox.htm

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error in lightbox page
« Reply #5 on: October 18, 2010, 03:30:12 AM »
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.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: Error in lightbox page
« Reply #6 on: October 18, 2010, 06:00:55 AM »
But this is not correct for me and directing to unknown page

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error in lightbox page
« Reply #7 on: October 18, 2010, 07:42:34 AM »
related to SEO mod you've installed. search that topic for an answer, I'm sure it's been asked and answered before.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: Error in lightbox page
« Reply #8 on: October 18, 2010, 07:45:22 AM »
Thank you very much for navigation! Will search :-)