PHP-在查询中使用别名时的未定义索引

I'm getting an error saying Undefined index when using alias on SQL query. This error occurs when the result assigning to the array. Fields without alias are works fine.

$strSql="SELECT PROCODE, SUM(TBLPRODUCT.SIH) AS SIH FROM PRODUCTTABLE GROUP BY PROCODE";
    $result = odbc_exec($con,$strSql) or die();

        if (odbc_num_rows($result) > 0) {  
            $result = odbc_fetch_array($result,0);
            $product = array();
            $product["psku"] = $result["PROCODE"];
            $product["sih"] = $result["SIH"];

} 

I'm using PHP version PHP Version 5.5.24 and the same code works fine on another pc with a different PHP version. What could be the issue?

Thanks :)

The issue is still there.. :( I have created views with those queries. So the app is working now.

Try to use "[Column]", to be sure about your $result keys, like:

$strSql="SELECT PROCODE, SUM(TBLPRODUCT.SIH) AS [SIH] FROM PRODUCTTABLE GROUP BY PROCODE";

If you still have issue, try to check $result keys