tags:

views:

19

answers:

1

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

echo odbc_result_all($getVolID);

gives:

Expr1000 49 1

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). Any ideas?

A: 

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.

Mark Wilkins
This fixes the the table name issue but not the issue with the 1 after the table. I've done tons of research and can't find any solution. Any ideas?
dcp3450
The number is actually the number of cells. Is there a way to trim that number off? I only need the COUNT value.
dcp3450