forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: cocostaff on March 09, 2007, 01:30:47 pm

Title: album/cat id and album/cat name
Post by: cocostaff on March 09, 2007, 01:30:47 pm
Is there a simple way to get a list of Album name & Album id ?? same question for category. How the id is determined by coppermine ? Does it correspond to the rank of the album in the coppermine albumlist ?

Thanks !
Title: Re: album/cat id and album/cat name
Post by: Joachim Müller on March 09, 2007, 02:19:13 pm
The album and category IDs are counted upwards, so the time of creation is the criteria that is being taken into account. Not sure if cpmFetch contains a method to populate an array/list of existing albums or categories.
Title: Re: album/cat id and album/cat name
Post by: cocostaff on March 09, 2007, 03:42:13 pm
so there is no direct way to know the specific ID of an album/cat... do you think it is possible to perform a database query to list the album ID in front of the album names ?

Title: Re: album/cat id and album/cat name
Post by: Nibbler on March 09, 2007, 03:55:11 pm
Just go into phpmyadmin and browse your album and category tables.
Title: Re: album/cat id and album/cat name
Post by: vuud on March 09, 2007, 04:20:05 pm
so there is no direct way to know the specific ID of an album/cat... do you think it is possible to perform a database query to list the album ID in front of the album names ?



I think you could use CpmFetch, have it return a result set and output based on that.  I figure since it is posted here, I would suggest a cpmfetch orienteed solution.

:)

Title: Re: album/cat id and album/cat name
Post by: cocostaff on March 09, 2007, 04:38:47 pm
Nibbler's solution is simple and work well, you can export the entire coppermine_albums table in csv file ! Thanks

Vuud, i think that a cpmfetch oriented solution will be great, and calling album_title in cpmfetch function  instead of id can be more efficient.
Title: Re: album/cat id and album/cat name
Post by: vuud on March 09, 2007, 05:07:37 pm
Nibbler's solution is simple and work well, you can export the entire coppermine_albums table in csv file ! Thanks

Vuud, i think that a cpmfetch oriented solution will be great, and calling album_title in cpmfetch function  instead of id can be more efficient.

I probably won't implement that ... I can see the posts, hundreds of them, all due to typos :)

That being said, calling by title may be "easier" for the user, but I doubt a text search in SQL would be more efficent.

People tend to just code in CpmFetch stuff once... for that its easy enough to just look at your gallery in a web page and note the album id or cat id...

Thats my opinion anyway