Database: ezcQuerySelectMssql
[ ]
[ Oracle setup ]
[ ]
[ ]
[ ]
[ ]
Class: ezcQuerySelectMssql
|
SQL Server specific implementation of ezcQuery. [
source]
This class reimplements the LIMIT method in which the SQL Server differs from the standard implementation in ezcQuery.
Parents
ezcQuery
|
--ezcQuerySelect
|
--ezcQuerySelectMssql
Inherited Constants
From
ezcQuerySelect:
Inherited Member Variables
From
ezcQuerySelect:
From
ezcQuery:
Method Summary
|
public string |
getQuery(
)
Transforms the query from the parent to provide LIMIT functionality. |
|
public void |
limit(
$limit, [$offset = 0] )
Returns SQL that limits the result set. |
|
public ezcQuery |
orderBy(
$column, [$type = self::ASC] )
Saves the ordered columns in an internal array so we can invert that order if we need to in the limit() workaround |
|
public void |
reset(
)
Resets the query object for reuse. |
Inherited Methods
From
ezcQuerySelect :
From
ezcQuery :
Methods
getQuery
string getQuery(
)
Transforms the query from the parent to provide LIMIT functionality.
Note: doesn't work exactly like the MySQL equivalent; it will always return $limit rows even if $offset + $limit exceeds the total number of rows.
Throws
| Class | Description |
ezcQueryInvalidException |
if offset is used and orderBy is not. |
Redefinition of
limit
void limit(
int
$limit, [int
$offset = 0] )
Returns SQL that limits the result set.
$limit controls the maximum number of rows that will be returned. $offset controls which row that will be the first in the result set from the total amount of matching rows.
Parameters
| Name |
Type |
Description |
$limit |
int |
integer expression |
$offset |
int |
integer expression |
Redefinition of
orderBy
ezcQuery orderBy(
string
$column, [string
$type = self::ASC] )
Saves the ordered columns in an internal array so we can invert that order if we need to in the limit() workaround
Parameters
| Name |
Type |
Description |
$column |
string |
a column name in the result set |
$type |
string |
if the column should be sorted ascending or descending. you can specify this using ezcQuerySelect::ASC or ezcQuerySelect::DESC |
Redefinition of
reset
void reset(
)
Resets the query object for reuse.
Redefinition of
Last updated: Tue, 23 Mar 2010