Author Topic: query problems with MySQL 5.0.x  (Read 196929 times)

0 Members and 1 Guest are viewing this topic.

Offline geoffbryant

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • http://www.cfgphoto.com
Re: query problems with MySQL 5.0.x
« Reply #75 on: January 12, 2008, 07:45:48 AM »
I've made all of the changes suggested in this thread and everything works except that I cannot upload or edit images from the admin control panel. I'm using 4images 1.7.1 with MySQL 5.2.5.

I know 1.7.4 may offer a solution but I can't really upgrade because of all the mods I've made.

Any ideas?
Geoff Bryant

Offline ipicture

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • Ipicture - Die Welt im Bild
Re: query problems with MySQL 5.0.x
« Reply #76 on: January 25, 2008, 09:32:55 AM »
Last night my provider also changes to MySQL 5.0 and I had this errors.

I changed all suggested lines v@no posted in #15, additional the mini_top.php for the error on the index. Thanks allot... :D

Greetings
Klaus

@ qgeoffbryant
Did you also change the "admin/home.php" ?

Offline Babybrit

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • BritneyInsider
Re: query problems with MySQL 5.0.x
« Reply #77 on: March 28, 2008, 03:56:46 AM »
after doing all that nothing has changed. anybody have any ideas.

Ok, please test this (if it all works, I'll post it as a compability fix):

Please note, in each file is possible more then one instance of searched line, that means all of the found lines must be changed as instructed!

In index.phpcategories.phpdetails.phppostcards.phpsearch.phptop.phpincludes/functions.php (two times) find:
Code: [Select]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." cReplace with:
Code: [Select]
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

In member.phpadmin/comments.php find:
Code: [Select]
FROM ".COMMENTS_TABLE." c, ".IMAGES_TABLE." iReplace with:
Code: [Select]
FROM (".COMMENTS_TABLE." c, ".IMAGES_TABLE." i)

Stop here. Test every page and only if you have problem continue next:

In postcards.php find:
Code: [Select]
FROM ".POSTCARDS_TABLE." p, ".IMAGES_TABLE." iReplace with:
Code: [Select]
FROM (".POSTCARDS_TABLE." p, ".IMAGES_TABLE." i)

In search.php find:
Code: [Select]
FROM ".WORDLIST_TABLE." w, ".WORDMATCH_TABLE." mReplace with:
Code: [Select]
FROM (".WORDLIST_TABLE." w, ".WORDMATCH_TABLE." m)

In includes/auth.php find:
Code: [Select]
FROM ".GROUP_ACCESS_TABLE." a, ".GROUP_MATCH_TABLE." mReplace with:
Code: [Select]
FROM (".GROUP_ACCESS_TABLE." a, ".GROUP_MATCH_TABLE." m)

In admin/home.php find:
Code: [Select]
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." sReplace with:
Code: [Select]
FROM (".USERS_TABLE." u, ".SESSIONS_TABLE." s)

In admin/usergroups.php find:
Code: [Select]
FROM ".GROUPS_TABLE." g, ".GROUP_MATCH_TABLE." gmReplace with:
Code: [Select]
FROM (".GROUPS_TABLE." g, ".GROUP_MATCH_TABLE." gm)

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #78 on: March 28, 2008, 08:18:57 AM »
hi,

Quote
after doing all that nothing has changed. anybody have any ideas.

if you did the changes and uploaded changed files it must work..
except your ftp client didn't overwrite the old files on the server..

check that
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 Babybrit

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • BritneyInsider
Re: query problems with MySQL 5.0.x
« Reply #79 on: March 30, 2008, 07:34:28 AM »
hi,

Quote
after doing all that nothing has changed. anybody have any ideas.

if you did the changes and uploaded changed files it must work..
except your ftp client didn't overwrite the old files on the server..

check that

yes it does over-right some of them. I now get this error on other pages to

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, u.user_email FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_id = 18391 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

Warning: Cannot modify header information - headers already sent by (output started at /home/britney/includes/db_mysql.php:188) in /home/britney/details.php on line 54

plus I still get the other one.

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 = 475 AND c.cat_id = i.cat_id ORDER BY image_name ASC LIMIT 0, 12
Unknown column 'i.user_id' in 'on clause'

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

the files are a mess now can I please PM or email brits_justified@hotmail.com one of you pros the log in details so you can log in & fix it please.

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: query problems with MySQL 5.0.x
« Reply #80 on: March 30, 2008, 08:51:56 AM »
Hi,

you forgot one of the codes.

The codes to change on the top are only codes from the standard 4images files.
Have you include mods in your page? Search modcodes, they also connect to the db with the wrong code (without msql5)


Kurt

Offline Babybrit

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • BritneyInsider
Re: query problems with MySQL 5.0.x
« Reply #81 on: April 11, 2008, 07:28:50 AM »
Please Someone reply I am down to 100+ hits a day before this happened I would get 10,000 + a day please help me.

"Have you include mods in your page? Search modcodes" I did a search & nothing came up.

thanks for all your help everyone to.

This comes up when you click on a picture to see it bigger & not as a Thumbnail.

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, u.user_email FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_id = 18797 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

Warning: Cannot modify header information - headers already sent by (output started at /home/britney/includes/db_mysql.php:188) in /home/britney/details.php on line 54

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #82 on: April 11, 2008, 09:08:18 AM »
send ftp account via PM.. i will look on it in few hours (~12)
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 Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #83 on: April 14, 2008, 09:03:16 PM »
solved... details.php didn't match MySQL 5
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 tripiyon

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #84 on: April 24, 2008, 11:47:50 AM »
Hello to all.

I have done all the changes that he says V@no, but me the links do not work
The page returns to remain equal.

My version is the 1.7 and I have Mysql 5.0.45

Here you can see my gallery.
http://www.galeriatripiyon.com/galeria

Offline Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
Re: query problems with MySQL 5.0.x
« Reply #85 on: April 25, 2008, 12:49:31 PM »
Thanks a lot ...this works!!

But i still got one Error-Page ..i guess from a mod i use. It is the "show all comments of user"

http://www.terradreams.de/gallery/member.php?action=showcomments&user_id=3597

Code: [Select]
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, i.image_allow_comments FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_id = 6663 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, i.image_allow_comments FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_id = 6664 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, i.image_allow_comments FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_id = 6644 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, i.image_allow_comments FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_id = 6641 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, i.image_allow_comments FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_id = 6631 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

I made all changes but i still got the error on this function.


EDIT!!

Sorry ....i found the line.

If you got that mod (show all comments of user) in your member.php, search for
Code: [Select]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
replace it with
Code: [Select]
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
« Last Edit: April 25, 2008, 01:00:14 PM by Neo1 »

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #86 on: April 26, 2008, 11:14:17 PM »
Hello to all.

I have done all the changes that he says V@no, but me the links do not work
The page returns to remain equal.

My version is the 1.7 and I have Mysql 5.0.45

Here you can see my gallery.
http://www.galeriatripiyon.com/galeria

hi tripiyon,

where are you getting errors, i don't see them
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 tripiyon

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #87 on: April 27, 2008, 11:31:56 AM »
Hi Nicky,

The problem is that the gallery does not work.
No link works and I cannot enter as user.

It does not work at all.

P.D.: Forgive my Englishman(English), I am Spanish and do not dominate the language.

Kind Regards

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #88 on: April 27, 2008, 09:59:08 PM »
hi,

send me ftp and 4images admin accounts.. i will look on it tomorrow in the evening
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 tripiyon

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #89 on: April 29, 2008, 10:13:10 AM »
Hi Nicky,

I ask for excuses you for the lateness.
I leave a link with the files of the gallery, in order that you could see them.

HERE

Thank you very much

 

Post your comments here