generally, only the first line of error message has any meaning.
line 181 => $query = "select * from category where category_id=$cat";
line 182 => $result = mysql_query($query);
line 183 => $parent_id = mysql_result($result,0,'parent_id');
line 181 is looking for some categories to display.
line 182 doesn't find them, so you get an error message when line 183 executes.
have you added categories?
.
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.