Loading...
 

DAL method: FetchByID()

Selects one or more records from the database matching 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':
PHP
global $dal;
$tblUsers = $dal->Table("UsersTable");
$tblUsers->Value["ID"]=32;
$rs = $tblUsers->FetchByID();
$data = db_fetch_array($rs);
ASP
dal.Table("UsersTable").Param("ID")=32
set rs = dal.Table("UsersTable").FetchByID()
The corresponding SQL query:
SQL
select * from UsersTable where ID=32