I can't think of a pure query way to do this off the top of my head but I'm sure there is one. This probably isn't the "best" way to get the task done but it should work. As long as you are using prepared queries the time impact will be minimal:
PHP Code:
<?
$catID=$_GET["c"];
$DBLink = mysqli_connect("host","user","pass","DB");
$DBLink->prepare("SELECT cat_parent_id,cat_name FROM categories WHERE cat_id=?");
$DBLink->bind_param('i',$catID);
$DBLink->bind_result($catID,$name);
do
{
$DBLink->execute();
$DBLink->fetch();
$breadcrumb[]=$name;
} while($catID != "0");
?>