I need a database that can store urls in catagories and then randomly will choose an url from the catagory. The probability for each url to appear should also be able to be adjusted. Can anyone assist me in finding one or making a database similar to this?
If you just want random, add "ORDER BY RAND() LIMIT 1" to the end of the table. Weighted will be more complicated. You can create two rows, one with the weight, and another that will count the number of times that url has been used. then, use "ORDER BY times / weight ASC LIMIT 1"
What you are asking for is not a function of a database. The database simply stores data. The functionality you need is best handled by a script IMO. Basically, you would get all records in the category and then select one randomly. Alternatively, you can get only one at random using the RAND command in your query as garbageman points out. /*tom*/ /*tom*/