Please enable JavaScript to view this site.

Navigation: » No topics above this level «

DAL method: DBLookup (Deprecated)

Scroll Prev Next More

 

Deprecated

Data Access Layer (DAL) methods are deprecated. While the existing code keeps working, we recommend switching to Database API.

 

Executes a SQL query passed as a parameter. Returns the first value of the first entry or null if nothing is found.

Syntax

DBLookup($sql)

Arguments

$sql

a SELECT clause. Example: "select * from UsersTable where ID=32".

Return value

Returns the first value of the first entry or null if nothing is found.

Example

Returns the zip value where userid is 25:

 

$zip = DBLookup("select zip from users where userid=25");

See also:

DAL Method: FetchByID

Database API

DB API: Exec

About Data Access Layer

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software