Author Topic: DB Error: Bad SQL Query: SELECT DISTINCT...ends with....Unknown column 'i.user_i  (Read 7258 times)

0 Members and 1 Guest are viewing this topic.

Offline El Profe

  • Pre-Newbie
  • Posts: 6
    • View Profile
I must confess, I'm new to webpage building.
Actually, I'm a musician and I usually just maintain the news and photos page on our website.
But we permanently lost our web builder and are currently in the process of checking out a new one to overhaul the entire site for our band.

In the meantime, that may take weeks or months since he wants to go Flash heavy..

In the meantime, I did the 3 things before posting and I did see some stuff that looked similar to my post I admit.
However, those threads went on over a course of a couple years and were very difficult for a man of my humble experience with HTML to follow after a while..

So please bear with me and thanks for the understanding...

Here's the whole message that is scrawling across my webpage showing to the public:


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 images i, categories c LEFT JOIN 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 images i, categories c LEFT JOIN 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, 3, 4, 5, 6) ORDER BY i.image_date DESC LIMIT 3
Unknown column 'i.user_id' in 'on clause'

I joined this forum today.
I also downloaded the latest version today 1.7.6

I believe I had a recent version from a couple years ago.
You can see the page at:

www.bandidosdeamor.com/photos/

Was this problem fixed in the lastest version already that I downloaded today?

Or do I need to do some editing in HTML on my webpage, after I replace the orig folder with the folder from the version 1.7.6 ?

note: to the best of my knowledge our website was just migrated from ipowerweb.com 's old servers to brand new ones and
it took 1/2 year. I started to experience this problem before the actual software migration was complete back in August of 2007.
We received a notice that the migration was completed a few weeks ago...so go figure?

I only recently found out (from my singer who knew him) that the web builder was no longer avail to fix it.
I had sent emails to him asking him to take care of it for months, but wasn't aware he wasn't receiving them
So now I've have started to work on the site myself with little or no experience,
but enough "cajones" to try and give it a shot if you folks could help me along.

It took me a long time to repair our news page which also got messed up.
It's still not quite right, being at the bottom instead of to the right side of a divided page.
I'm just learning Dreamweaver and how cells and columns and style sheets and all that stuff work...
it's a new language and I can only get to study it a little here and a little there in my spare time.
(There's probably a bunch of part time web people here... Hi, from sunny Callifornia, USA)

I hope to hear back from you with some good news,

thanks,

el professor

Offline El Profe

  • Pre-Newbie
  • Posts: 6
    • View Profile
I thought it might be good to include the following I copied from my web hosting service:

Platform Type
Debian

MySQL Version
5.0.45

Perl Version
5.8.8

PHP Version
4.4.7


Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline El Profe

  • Pre-Newbie
  • Posts: 6
    • View Profile
Hi Kai,

I read the message you linked me to.

It seems simple to do.

I'll see how it goes and report back soon.

thanks,

el profe




Offline El Profe

  • Pre-Newbie
  • Posts: 6
    • View Profile
Yes this did the trick.

Thank you Thank you Thank you!!!

I fixed the version that I had already in use.  It appeared to be the version prior to the latest update available.

I also requested my host provider to update to the latest version of MySql and Php. as was pointed out in a post elsewhere on this forum as a good thing to do.

Question:

1. Will I need to update 4images to the latest version due to the update of MySql and Php to the very 2008 versions?

2. If I replace the version of 4images I currently have on the site with the most current, do I need to do that (parenthesis) insertion to that version's lines of code.

I did look over the code with Dreamweaver's find and replace and couldn't find that text to replace it, so I imagined that the coding is worded entirely different.

Is that the case? So there's nothing needed to be done with the new 4images version and it will work fine with the very latest versions of mySql and Php?

thanks again,

el profe (lg)

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
A question remains as first : Where is the 4images copyright notice on your gallery ?
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 El Profe

  • Pre-Newbie
  • Posts: 6
    • View Profile
I'm not sure?

I wasn't the one who installed it originally.

I only updated the images.

Then we lost our webmaster.

Then back around last fall they updated the MySql on the host server and I started having problems,
not being able to login or see images.

Then I finally came here recently to learn how to fix the problem.

I just fixed that.

But wasn't aware of the copyright visability..

How do I turn that on?

I don't have any problems wanting to do it for you, just need to learn how.

el profe

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
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 El Profe

  • Pre-Newbie
  • Posts: 6
    • View Profile
Code:

<p id="copyright" align="center">
  Powered by <b>4images</b> '.SCRIPT_VERSION.'
  Copyright &copy; 2002-'.date('Y').' <a href="http://www.4homepages.de" target="_blank">4homepages.de</a>
</p>


will this place it in the bottom of the page?

el profe