ODBC_FETCH_ARRAY () Does not return the result

0

Good morning, please help with this topic. I need PHP to be able to place the result of a query in an array using an ODBC connection. For this, I use the odbc_fetch_array () function but the query is not showing me.

The code is:

$consulta = "select * from inmcartdat.cacredit where empcod = '1' and cacstc = 60";

$sql = odbc_exec($db,$consulta);

$a = odbc_fetch_array($sql);

echo $a[0];

So the echo should show "1".

I already appreciate your help.

    
asked by Daniel León 25.05.2018 в 19:50
source

0 answers