• [Mod] Mini-Top 5 0 5 1
Currently:  

Author Topic: [Mod] Mini-Top  (Read 235606 times)

0 Members and 1 Guest are viewing this topic.

Offline OtusDesign

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [Mod] Mini-Top
« Reply #120 on: April 21, 2008, 02:10:22 AM »
Hi,
I did everything what you tell but I have this error :

DB Error: Bad SQL Query: 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, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1) ORDER BY i.image_rating DESC, i.image_votes DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: 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, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1) ORDER BY i.image_votes DESC, i.image_rating DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: 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, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1) ORDER BY i.image_hits DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'


How should I do ?

Thanks in advance

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [Mod] Mini-Top
« Reply #121 on: April 21, 2008, 05:57:42 AM »
Hi,

the modecode is not msql5 compatible :wink:

in modcode:
search:
Code: [Select]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." cchange to:
Code: [Select]
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
You can find more about the msql5 Problems here:
http://www.4homepages.de/forum/index.php?topic=10184.15


Read the thread  :wink: => Antwort #125


KurtW

Offline OtusDesign

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [Mod] Mini-Top
« Reply #122 on: April 21, 2008, 09:50:40 PM »
Thanks a million :) I solve the problem

Offline xsbucket

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [Mod] Mini-Top
« Reply #123 on: June 19, 2008, 01:13:51 AM »
why only I got an error...what is wrong with me?


I get this eroor in index page

DB Error: Bad SQL Query: 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, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_rating DESC, i.image_votes DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: 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, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_votes DESC, i.image_rating DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: 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, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_hits DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: 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, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_comments DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'




Now i'm getting this error, it was working good before....anybody has any idea why this happened??
I tried everything to fix it but nothing happens....is it possible its because my hosting company.

Offline xsbucket

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [Mod] Mini-Top
« Reply #124 on: June 19, 2008, 04:26:15 AM »
Plus i tried to remove the mini top mod but NOTHING HAPPENS!!! I STILL SEE THE MINI TOP BOX AND ERRORS!!!!


SOMEONE PLEASE HELP!! PM ME!

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [Mod] Mini-Top
« Reply #125 on: June 19, 2008, 05:44:48 AM »
Hi xsbucket,

look Reply #129 in this thread => link :wink:


Kurt

Offline xsbucket

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [Mod] Mini-Top
« Reply #126 on: June 19, 2008, 08:42:02 AM »
Hi xsbucket,

look Reply #129 in this thread => link :wink:


Kurt


Hi Kurt!

I have tried everything!!! NOTHING works....i find that strange since it was working perfectly for the past 2 months!!!! Also, i can't even remove the mini top mod!!! I deleted the files and modified the home.html and i still see the mini top and the errors!!!! What could this be?

Offline xsbucket

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [Mod] Mini-Top
« Reply #127 on: June 19, 2008, 08:45:23 AM »
Also...when i'm logged in as admin i see the whole error message but when i'm logged in as a user i only see

unexpected error has occured, please try again later!!!!!!

I really don't understand what happened...is it possible my website got hacked?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Mini-Top
« Reply #128 on: June 19, 2008, 09:54:02 AM »
xsbucket,

like KurtW already wrote: your host changed mysql version
Hot Shots
you should adjust..


Quote
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/xsbucket/public_html/includes/db_mysql.php on line 39

An unexpected error occured. Please try again later.
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline xsbucket

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [Mod] Mini-Top
« Reply #129 on: June 19, 2008, 09:26:27 PM »
Hi nicky!

I see that my version of mysql is 4.1.22   I'm not sure if they changed it or it was always the same. I tried making the changes with the () and without and i still get the error.

I even tried to remove the mini top but NOTHING HAPPENS!!! I still see the mini top box even if i remove the code! I really don't understand hows that possible. It was working fine before. I want to know if there is any other explaination for this error or what could cause this other then the mysql version.

I appreciate all your help guys, but can you tell me what other reasons i could be getting this error and behavior?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Mini-Top
« Reply #130 on: June 19, 2008, 09:29:46 PM »
send ftp details
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline xsbucket

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [Mod] Mini-Top
« Reply #131 on: June 19, 2008, 10:11:49 PM »
send ftp details

I'm sorry but i'm pretty new to programming....what do you mean ftp details?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Mini-Top
« Reply #132 on: June 19, 2008, 10:43:55 PM »
send me your FTP account details to see your files..
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline xsbucket

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [Mod] Mini-Top
« Reply #133 on: June 19, 2008, 10:59:45 PM »
Pm sent with ftp info

Offline e-trader_2002

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: [Mod] Mini-Top
« Reply #134 on: July 15, 2008, 11:16:21 PM »
Hi folks,

I've added this nice little mod a long time ago to my 4images website. Recently I realized, that the generation of the page with the minitop mod is considerably delayed by one of the mySQL-Queries of this mod. But a small change will speed-up the page generation again.

Find this mySQL-Query in minitop.php
Code: [Select]
$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, i.image_postcards".$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 c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

and change it by adding ."LIMIT 1" at the end of the query:
Code: [Select]
$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, i.image_postcards".$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 c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt]." LIMIT 1";

Maybe someone will find this little advice useful.

e-trader_2002
« Last Edit: July 16, 2008, 11:10:33 PM by e-trader_2002 »
A hobby is a great way to spent time you actually don't have! :wink: