Author Topic: [1.7/1.7.1 (upgrade only)] Categories hits stops at 32767  (Read 42729 times)

0 Members and 1 Guest are viewing this topic.

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
[1.7/1.7.1 (upgrade only)] Categories hits stops at 32767
« on: April 02, 2005, 02:38:25 PM »
To fix that you'll need change the type of cat_hits field in 4images_categories table from smallint(6) to int(10)

Here is MySQL query for your convinience:
Code: [Select]
ALTER TABLE `4images_categories` CHANGE `cat_hits` `cat_hits` INT( 10 ) DEFAULT '0' NOT NULL
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 ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [1.7] Categories hits stops at 32767
« Reply #1 on: April 13, 2005, 11:11:11 PM »
is this gonna happen to every one?

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [1.7] Categories hits stops at 32767
« Reply #2 on: April 13, 2005, 11:28:15 PM »
Yes - as long as "everybody" has the cat_hits data-type set to smallint - which length is from -32768 to 32767

I guess your counter doesn't go backwards, so you won't have any problems with the -32768 border-line ;)

Int can hold up to 2147483647 hits and I guess that will take a while untill you'll get at this point  :lol:
MAяTRIX


Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [1.7] Categories hits stops at 32767
« Reply #3 on: April 14, 2005, 01:19:54 AM »
so what i have to do is to change the data-type of cat_hits to get more space?

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [1.7] Categories hits stops at 32767
« Reply #4 on: April 14, 2005, 09:30:31 AM »
 :roll: you have to read V@no's post  :roll:
and then run the MySQL query he wrote... not more not less...
MAяTRIX


Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: [1.7] Categories hits stops at 32767
« Reply #5 on: April 15, 2005, 05:26:07 AM »
when you click refresh button they  still update counter visit of the category page.
how to stop this  :?:

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: [1.7] Categories hits stops at 32767
« Reply #6 on: April 15, 2005, 05:32:17 AM »
the hits dont count "unique" hits, the hits are how many times categories.php was requested.
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 kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [1.7] Categories hits stops at 32767
« Reply #7 on: May 03, 2005, 06:09:18 PM »
would you like to explain where i can find the file i have to change ? can't find it....

thx !!!

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [1.7] Categories hits stops at 32767
« Reply #8 on: May 03, 2005, 06:26:17 PM »
it is not a file what u have to change you need to go to PHPmyadmin and do this
To fix that you'll need change the type of cat_hits field in 4images_categories table from smallint(6) to int(10)

Here is MySQL query for your convinience:
Code: [Select]
ALTER TABLE `4images_categories` CHANGE `cat_hits` `cat_hits` INT( 10 ) DEFAULT '0' NOT NULL

Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [1.7] Categories hits stops at 32767
« Reply #9 on: May 04, 2005, 10:35:53 PM »
maybe i am missing something here,
but how do i access phpmyadmin?

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [1.7] Categories hits stops at 32767
« Reply #10 on: May 04, 2005, 11:33:30 PM »
that depends on the configuration of your server and where it is installed...

sometimes it is

www.yourdomain.com/phpmyadmin
sometimes
mysql.yourdomaincom
and similar.
Your webspace-provider should be able to give you the needed information...
MAяTRIX


Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [1.7] Categories hits stops at 32767
« Reply #11 on: May 05, 2005, 12:11:58 PM »
ok, found it , thx a lot

Offline Naveen

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [1.7] Categories hits stops at 32767
« Reply #12 on: June 08, 2005, 06:10:07 AM »
I was going to post a thread on this, good that I checked out first.

This is what happens


Thank you V@no, I'll try out your trick :)


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: [1.7/1.7.1 (upgrade only)] Categories hits stops at 32767
« Reply #13 on: February 25, 2006, 06:02:17 PM »
@RED_LINE:
continue discussion the issue you have here
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 Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: [1.7/1.7.1 (upgrade only)] Categories hits stops at 32767
« Reply #14 on: June 27, 2006, 06:16:48 PM »
I´ve done these changes from small int 6 to small int 10, but it doesn´t work  :roll:

Project offline