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

0 Members and 1 Guest are viewing this topic.

Offline axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: query problems with MySQL 5.0.x
« Reply #105 on: September 05, 2008, 11:52:55 PM »
hi,

for test, try only with this code in faq.php

Code: [Select]
<?php 
/************************************************************************** 
 *                                                                        * 
 *    4images - A Web Based Image Gallery Management System               * 
 *    ----------------------------------------------------------------    * 
 *                                                                        * 
 *             File: faq.php                                           * 
 *        Copyright: (C) 2002 Jan Sorgalla                                * 
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7                                                  * 
 *                                                                        * 
 *    Never released without support from: Nicky (http://www.nicky.net)   * 
 *                                                                        * 
 ************************************************************************** 
 *                                                                        * 
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       * 
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 * 
 *    ---------------------------------------------------------------     * 
 *    This script is NOT freeware! Please read the Copyright Notice       * 
 *    (Licence.txt) for further information.                              * 
 *                                                                        * 
 *************************************************************************/ 

$main_template "faq"

define('GET_CACHES'1); 
define('ROOT_PATH''./'); 
define('GET_USER_ONLINE'1); 
include(
ROOT_PATH.'global.php'); 
require(
ROOT_PATH.'includes/sessions.php'); 
include(
ROOT_PATH.'includes/page_header.php'); 

 
//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
  
"lang_control_panel" => $lang['control_panel'
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>


[EDIT]
and btw. like V@no wrote in his previous post this will solve your issue.

Tried already your code my FAQ page already working now, great help and a big thanks!
Superb support here...

And i'll try @vano's idea too later...

Offline axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: query problems with MySQL 5.0.x
« Reply #106 on: September 05, 2008, 11:57:03 PM »
Actually, i do that already. But, still not working?
Do i have to re install it? What do you think?

In the attached files you don't have it...

Ill' do it again later to fix my problem especially my contact us page since my FAQ page was already working with the help of Admin Nicky, you have both great idea and support.

Offline axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: query problems with MySQL 5.0.x
« Reply #107 on: September 06, 2008, 02:23:55 AM »
Thanks all already fix my problem with the help of Ivan Works; http://www.4homepages.de/forum/index.php?topic=8987.135

Offline djith

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #108 on: September 07, 2008, 12:25:10 PM »
After all the changes whit the brackets i still get the error, my server is using mysql 5.0.51 and i'm using 4images 1.7.1 and made so many mods on it that i need to keep the 1.7.1 !!
 the error is:

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 NOT IN (0) AND c.cat_id = i.cat_id LIMIT 1683, 1
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_downloads DESC LIMIT 0, 32
Unknown column 'i.user_id' in 'on clause'

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


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: query problems with MySQL 5.0.x
« Reply #109 on: September 07, 2008, 01:47:19 PM »
Then you missed some.
I just published more complete tutorial
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: query problems with MySQL 5.0.x
« Reply #110 on: December 30, 2010, 01:34:29 PM »
After my Hoster changed the MySQL Server - i have done this http://www.4homepages.de/forum/index.php?topic=10184.0;msg=53697
but top.php is not holding this information and also still gives error!

have a nice day
vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Rembrandt

  • Guest
Re: query problems with MySQL 5.0.x
« Reply #111 on: December 30, 2010, 03:01:23 PM »
...but top.php is not holding this information and also still gives error!
...

keine ahnung wie die top.php in der V.1.7 aussieht aber du brauchst doch nur in den SQL abfragen das:
".IMAGES_TABLE." i".CATEGORIES_TABLE." c
in klammern setzen.

mfg Andi