Select a query after try catching PHP
Anyone knows why my sql query doesn't work after using a try catch function? the code is a regular code as I'm using every time and it works perfectly but when I try to use it after a try catch function it doesn't work,

    $carType = 'ECAR';
    $category = substr($carType,0,1);
    if($category){
        $querycy = ("SELECT * FROM carClassCodes where ClassC = '$category'");
        $resultcy = mysql_query($querycy);
        $rowcy = mysql_fetch_array($resultcy);
    }

Thanks in advance.
Select a query after try catching PHP
===

Anyone knows why my sql query doesn't work after using a try catch function? the code is a regular code as I'm using every time and it works perfectly but when I try to use it after a try catch function it doesn't work,

    $carType = 'ECAR';
    $category = substr($carType,0,1);
    if($category){
        $querycy = ("SELECT * FROM carClassCodes where ClassC = '$category'");
        $resultcy = mysql_query($querycy);
        $rowcy = mysql_fetch_array($resultcy);
    }

Thanks in advance.