
April 19th, 2004, 07:25 PM
|
|
Registered User
|
|
Join Date: Apr 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
displaying a list in msaccess
Hello, I am new into this and I'd like to be able to display the usernames in addition to the count, something like $allusers. Please can someone help me?
$numusers=0;
$connect=odbc_connect($dsn,$dsnuid,$dsnpass);
$query = "select STATUS,USERNAME FROM USERACCOUNT WHERE STATUS <> 'Not In Use'";
$recordset=odbc_exec($connect,$query);
while ($row = odbc_fetch_row($recordset)) {
$curpc = odbc_result($recordset,'STATUS');
$PCs[$curpc]=TRUE;
if (odbc_result($recordset,'USERNAME')) {
$name=odbc_result($recordset,'USERNAME');
$Users[$curpc]=$name;
}
$numusers++;
}
|