Dennis Yang wrote: > I'm using PHP 4.3.2 and using ODBC to connect to my Access database. I > want to get the value from this query statement: > "select count(id) as quantity from danhmucdia". How can I get this value? > How can I equalize this value into variable ? It's a query, just like any other query. So you're going to send it to ODBC the same as you send any other query. I don't know the ODBC syntax, but it's going to be something like: $query = "select count(id) as quantity from danhmucdia"; $id_count_set = odbc_query($query) or trigger_error(odbc_error() . " $query", E_USER_ERROR); $id_count = odbc_result($id_count_set, 0, 0); You could also use odbc_fetch_row or odbc_fetch_array. The preceding lines all assume ODBC works the same as MySQL, which may or may not be true to varying degrees of truth. http://php.net/odbc -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php