Author Topic: DB Error: Bad SQL Query  (Read 2531 times)

0 Members and 1 Guest are viewing this topic.

Offline farseeker

  • Pre-Newbie
  • Posts: 1
    • View Profile
DB Error: Bad SQL Query
« on: December 04, 2002, 02:49:44 AM »
Pardon me for using english, unfortunatly I know limited German.

This issue has probably been covered before but I could not find the post, so even if you just give me the URL to the answer would be great, thanks.

Upon a fresh installation of 4Images, without uploading any images, I get the following error in the header of my page:

Quote
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()
You have an error in your SQL syntax near 'RAND()' at line 5


The the index continues to load normally.

A fresh install of PHP, recreating the mySQL database and re-installing 4images has no effect.

http://www.lyv.org.au/galleries/index.php is the URL.

Thankyou,

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
DB Error: Bad SQL Query
« Reply #1 on: December 04, 2002, 09:14:14 AM »
Please search the forum for "Rand".

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search