Odbc_result_all formatting


$selectVolID = "Select COUNT(VolunteerID) from planetVolunteers";
$getVolID = odbc_exec($connect, $selectVolID);

echo odbc_result_all($getVolID);



49 is the correct count. I want to change the Expr1000 to something legible and get rid of that 1 (which i assume means there are no more values to count).

Best Solution

You can use an alias in the SELECT statement to a more descriptive name:

SELECT COUNT(VoluneerID) NumVolunteers from ...

Depending on the underlying database engine, it is possible that the AS keyword migh be needed in front of the alias.

I have dealt very little with PHP, so I do not know about the 1 that is printed.

Related Question