coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: giorgio79 on February 11, 2007, 06:37:26 PM

Title: user_id and albums
Post by: giorgio79 on February 11, 2007, 06:37:26 PM
I was under the impression that the user_id from the users table (in my case phpbb_users) equals the category in coppermine_albums table, but I just notice that they are slightly different.

Could someone explain why?

For example:
A user_id of 100055 will have category 110055

And I do not understand why. I have seen queries where they add FIRST_USER_CAT, does this have to do with it?

Cheers,
Gyuri
Title: Re: user_id and albums
Post by: Nibbler on February 11, 2007, 06:47:58 PM
The user gallery categories are numbered using 10000 + the user id to differentiate them from regular categories. FIRST_USER_CAT is a constant that is set to 10000 to make it easier to change if required.
Title: Re: user_id and albums
Post by: giorgio79 on February 11, 2007, 07:33:27 PM
Thanks Nibbler for your kind explanation.

Sticking to my example, I do not see the logic followed for user_id 100055

Should not it be 1100055, and not 110055? It feels like a 0 is chopped off...

Cheers,
Gyuri
Title: Re: user_id and albums
Post by: Nibbler on February 11, 2007, 08:25:52 PM
100055 + 10000 = 110055
Title: Re: user_id and albums
Post by: giorgio79 on February 11, 2007, 09:23:17 PM
ah, cool :D

thank you very much for your time and patience