Author Topic: DB Error: Bad SQL Query after upgrading to MySQL 5  (Read 2790 times)

0 Members and 1 Guest are viewing this topic.

Offline chopin

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • Greek translation
DB Error: Bad SQL Query after upgrading to MySQL 5
« on: January 29, 2009, 10:03:57 AM »
Is there any solution for this?
http://www.kapetanopoulos.net/en/

Code: [Select]
DB Error: Bad SQL Query: SELECT DISTINCT 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 i.cat_id NOT IN (0) AND c.cat_id = i.cat_id ORDER BY RAND()
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 i.cat_id = 1 AND c.cat_id = i.cat_id ORDER BY image_name ASC LIMIT 9, 9
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/kapetano/public_html/en/includes/db_mysql.php on line 116

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: DB Error: Bad SQL Query after upgrading to MySQL 5
« Reply #1 on: January 29, 2009, 10:50:58 AM »
... 5 sec. with searching I found the answer for you ...

http://www.4homepages.de/forum/index.php?topic=10184.msg53697#msg53697
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 ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline chopin

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • Greek translation
Re: DB Error: Bad SQL Query after upgrading to MySQL 5
« Reply #2 on: January 29, 2009, 06:13:31 PM »
Many thanks :)
I had to do the multiple find/replace with ultra edit to fix all problems.