think its your sql query there:
1) your trying to query two databases or something or other (company_categories,cat1) which i dunno about the majority, but never works for me
2) also, should you be saying
$sql = "SELECT * FROM company_categories,cat1 WHERE company_categories.CatID=cat1.CatID AND company_categories.company_id='$company_id'";
instead. Try adding:
echo mysql_error();
and see what it gives you.