That error might signify that something is wrong with your $db variable.
if you are not doing multiple database connections try this.
$resultstar = mysql_query("SELECT * FROM $cat WHERE active=0 and rest_id=$rest_id");
else
post your connection code.
Ace21