*****
FIXED
*****
had a typo in the url, so the variables were getting set incorrectly, i knew it would be something simple, but never thought about the problem being in the url.
Hello,
i have 2 pieces of php code for performing different tasks when selecting records from my mysql database.
the first...
$query="SELECT * FROM content ORDER BY RAND() LIMIT 1";
...randomly selects 1 record from the database.
the second...
$query="SELECT * FROM content WHERE category = '$category'";
...selects all the records which have a particular value in the 'category' field.
is it possible to combine these 2 statements to produce a piece of code which randomly selects 1 record from the database which has a particular value in the 'category' field?
thank you

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic