forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: Tranz on January 30, 2005, 07:23:54 pm
-
http://forum.coppermine-gallery.net/index.php?topic=10087.0
You need to figure out what you want to exclude.
-
I m figuring it out how I missed that thread ;) (I did search before posting this)
I will apply that modification tomorrow and let u know if I got any trouble. (time to sleep now)
Thanks for the help
-
I guess ppl dont reply on threads that are marked as "Solved" coz i posted my problem in the thread that u gave to me but no reply so i m posting it here again
i dont know if i have done wrong
but instaed of using title, i used "aid" , but nothing happen. Still images from that album was coming on randome files
i did this
$sql = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE aid <> 11 AND approved = 'YES' $ALBUM_SET ORDER BY RAND() LIMIT $limit2";
As suggested by rs25.com in the topic.
Also , I need to use this for 3 albums, How coud possibly I do this ?
Is this possible to do the same thing with Category Name or (cid) , Its because i have 4 albums in one category and i want to restrict all of them
Waiting fot ur Guidence
-
Try changing
WHERE aid <> 11 AND
to;
WHERE (aid < '11' OR aid > '11') AND
-
Ok.. I did it , SO far its working fine for one Album.
But
I need to do it with three albums ( aid 10 , 11 , 12 ). All these albums belong to One category (cid= 8 )
SO is there Any way i can do this bu using cid or aid ???
-
Your post makes no sense.
You can use IN to specify multiple albums:
WHERE aid NOT IN (10,11,12)
that will exclude albums with aid 10,11,12. And using:
WHERE cid <> 8
will exclude albums in category 8.
-
SORRY
I guess i was feeling sleepy when i posted the last message. I used cid on both places. What i mean was 3 albums that belong to One category.
I have corrected the post.
I have tried "" WHERE cid <> 8 "" before but it didnt work. i get some error message while using " cid ".
I think i must use aid . So how can i restrict three albums that has " aid 10, 11 , 12 " (These are Album ID's)
-
There is no cid in the pictures table. If you want to use it, you would need to call up the category table and/or the albums table.
-
Yes, I also think so. I need to modify the code in order to use " cid "
Any way , Many Thankxx to " Nibbler "
I used
WHERE aid NOT IN (10,11,12)
And These Three albums r not showing in Randoom . Working Perfect :)
The Issue Solved :)
-
That does seem to be the easier solution. Glad it's working.