Deprecated
This function is deprecated, and we recommend using the DB:Select() function from Database API.
Selects one or more records from the database that matches the condition.
Syntax
FetchByID()
Arguments
No arguments.
Return value
Returns the recordset on success or FALSE on error.
Example
Select all records where ID is '32'. To fetch a returned row as an associative array, use the db_fetch_array function.
global $dal;
$tblUsers = $dal->Table("UsersTable");
$tblUsers->Param["ID"]=32;
$rs = $tblUsers->FetchByID();
while( $data = db_fetch_array($rs) )
{
echo $data["UsersName"];
}
Note: the db_fetch_array function is deprecated, and we recommend using the fetchAssoc function instead.
The corresponding SQL query:
select * from UsersTable where ID=32
See also:
•QueryResult object: fetchAssoc