ePages 7.48.0 - DE_EPAGES/Search/DAL/PagerSearch.pm

Package DE_EPAGES::Search::DAL::PagerSearch

object interface for Search.

Base
DE_EPAGES::Presentation::API::Object::Pager
@EXPORT_OK
DAL_ExecutePagerSearch
DAL_GetSQLSelect
DAL_GetSQLSimpleSelect
DAL_GetItems
DAL_GetSQLLimit
DAL_GetSQLGroup
DAL_GetSQLSort
DAL_GetSQLSortMax

Functions

DAL_ExecutePagerSearch
DAL_GetSQLGroup
DAL_GetSQLLimit
DAL_GetSQLSelect
DAL_GetSQLSimpleSelect
DAL_GetSQLSort
DAL_GetSQLSortMax

DAL_ExecutePagerSearch

Queries results for the given SQL command and stores the results in an internal array. The resultset depends on the current page which the user is viewing. Only the results for this page are queries (at least for MySQL)

Syntax
$aValues = DAL_ExecutePagerSearch($PageNumber, $SQL, $ParameterValues);
Input
$PageNumber (integer)
the current page, starting with 1
$SQL (string)
The SQL query
$ParameterValues (ref.array)
parameters for the SQL query
Return
$hValues (reference to hash)
with following keys:
  • CurrentPage - current displayed page (starting with 1) - int
  • Items - result item ids - ref.array
  • ItemCount - number of result items - int

DAL_GetSQLGroup

Returns the SQL GROUP BY statement for PagerSearch depending on the current database system

Syntax
$SQL = DAL_GetSQLGroup();
Return
$SQL (string)
the SQL query

DAL_GetSQLLimit

Returns the SQL limit statement depending on the current database system

Syntax
$SQL = DAL_GetSQLLimit($Offset, $PageSize);
Input
$Offset (integer)
the number of the first item of the page in the result array
$LastItemOfPage (integer)
the number of items which are displayed on one page
Return
$SQL (string)
the SQL limit statement

DAL_GetSQLSelect

Returns the SQL select statement for PagerSearch depending on the current database system

Syntax
$SQL = DAL_GetSQLSelect();
Return
$SQL (string)
the SQL query

DAL_GetSQLSimpleSelect

Returns the SQL select statement without DISTINCT for PagerSearch depending on the current database system

Syntax
$SQL = DAL_GetSQLSimpleSelect();
Return
$SQL (string)
the SQL query

DAL_GetSQLSort

Returns the ORDER BY clause of the SQL statement

Syntax
$SQL = DAL_GetSQLSort($OrderByPart, $OrderDesc, $IgnoreCase);
Input
$OrderByPart (string)
sort criteria
$OrderDesc (boolean)
order descending if true, otherwise ascending
$IgnoreCase (boolean)
don't sort case sensitive if true
Return
$SQL (string)
partial SQL statement

DAL_GetSQLSortMax

Returns the ORDER BY MAX(...) clause of the SQL statement specific for dates

Syntax
$SQL = DAL_GetSQLSortMax($OrderByPart, $OrderDesc, $IgnoreCase);
Input
$OrderByPart (string)
sort criteria
$OrderDesc (boolean)
order descending if true, otherwise ascending
$IgnoreCase (boolean)
don't sort case sensitive if true
Return
$SQL (string)
partial SQL statement