Askali 0 Newbie Poster

I am currently working on a small game, and couldn't get my head around if this could be done within mysql easily or even at all.

Within the map there can be creatures in different areas, and to limit them, I used a pool to seed the creatures that could be met within random encounters, water creatures at the sea etc etc.

Now using the pool works, and selects the creatures within it, but eventually there will be upto 50 creatures being selected with a pool of 2-5, so I need to replicate the entries being selected randomly.

Here's an example select code:

SELECT `ID` FROM `db_crits` WHERE `ID` IN(129, 131) AND `Cat` = 'NPC' ORDER BY RAND() LIMIT 11

And the output for this is just the 2 ID's within the where query, but I need to be able to select upto the maximum set by the limit.

Any advice would be excellent, thank you.