Author Topic: Problem with {categories} sql error  (Read 3385 times)

0 Members and 1 Guest are viewing this topic.

Offline zoomos

  • Newbie
  • *
  • Posts: 14
    • View Profile
Problem with {categories} sql error
« on: September 28, 2006, 06:13:57 AM »
I've added {categories} code (below) to categories.php and I get a sql error.

Coded added
[qcode]//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
$categories = get_categories(0);
if (!$categories)  {
  $categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
unset($categories);

unset($random_cat_image);[/qcode]

Error:
[qcode]DB Error: Bad SQL Query: UPDATE 4images_categories SET cat_hits = cat_hits + 1 WHERE cat_id = 1
Table 'test_click.4images_categories' doesn't exist[/qcode]

Works in everything but categories.php, login.php and member.php

I searched but couldn't find the thread to help me.

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: Problem with {categories} sql error
« Reply #1 on: September 28, 2006, 06:26:14 AM »
where did you insert that code?

P.S. I'm doubtfull that error is related to your code....
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)