Dotclear 2.24
|
Public Member Functions | |
__construct () | |
join ($c, bool $reset=false) | |
union ($c, bool $reset=false) | |
having ($c, bool $reset=false) | |
order ($c, bool $reset=false) | |
group ($c, bool $reset=false) | |
groupBy ($c, bool $reset=false) | |
limit ($limit) | |
offset (int $offset) | |
distinct (bool $distinct=true) | |
statement () | |
select () | |
run () | |
![]() | |
__construct () | |
__get (string $property) | |
__set (string $property, $value) | |
__isset (string $property) | |
__unset (string $property) | |
__invoke () | |
statement () | |
columns ($c, bool $reset=false) | |
fields ($c, bool $reset=false) | |
column ($c, bool $reset=false) | |
field ($c, bool $reset=false) | |
from ($c, bool $reset=false, bool $first=false) | |
where ($c, bool $reset=false) | |
on ($c, bool $reset=false) | |
cond ($c, bool $reset=false) | |
and ($c, bool $reset=false) | |
andGroup ($c) | |
or ($c, bool $reset=false) | |
orGroup ($c) | |
sql ($c, bool $reset=false) | |
escape (string $value) | |
quote ($value, bool $escape=true) | |
alias (string $name, string $alias) | |
as (string $name, string $alias) | |
in ($list, string $cast='') | |
inSelect (string $field, dcSelectStatement $sql) | |
dateFormat (string $field, string $pattern) | |
like (string $field, string $pattern) | |
regexp (string $value) | |
unique (string $field) | |
count (string $field, ?string $as=null, bool $unique=false) | |
avg (string $field, ?string $as=null) | |
max (string $field, ?string $as=null) | |
min (string $field, ?string $as=null) | |
sum (string $field, ?string $as=null) | |
isNull (string $field) | |
isNotNull (string $field) | |
isSame (string $local, string $external) | |
compare (string $external, bool $trigger_error=false, bool $dump=false, bool $print=false) | |
Protected Attributes | |
$join | |
$union | |
$having | |
$order | |
$group | |
$limit | |
$offset | |
$distinct | |
![]() | |
const | VERBOSE_SQL_ALIAS = false |
$con | |
$syntax | |
$_AS = ' ' | |
$columns = [] | |
$from = [] | |
$where = [] | |
$cond = [] | |
$sql = [] | |
Select Statement : small utility to build select queries
__construct | ( | ) |
Class constructor
Reimplemented from dcSqlStatement.
References distinct(), group(), having(), join(), limit(), offset(), and order().
join | ( | $c, | |
bool | $reset = false |
||
) |
Adds JOIN clause(s) (applied on first from item only)
mixed | $c | the join clause(s) |
boolean | $reset | reset previous join(s) first |
References join().
Referenced by __construct(), join(), and statement().
union | ( | $c, | |
bool | $reset = false |
||
) |
having | ( | $c, | |
bool | $reset = false |
||
) |
Adds HAVING clause(s)
mixed | $c | the clause(s) |
boolean | $reset | reset previous having(s) first |
References having().
Referenced by __construct(), having(), and statement().
order | ( | $c, | |
bool | $reset = false |
||
) |
Adds ORDER BY clause(s)
mixed | $c | the clause(s) |
boolean | $reset | reset previous order(s) first |
References order().
Referenced by __construct(), order(), and statement().
group | ( | $c, | |
bool | $reset = false |
||
) |
Adds GROUP BY clause(s)
mixed | $c | the clause(s) |
boolean | $reset | reset previous group(s) first |
References group().
Referenced by __construct(), group(), groupBy(), and statement().
groupBy | ( | $c, | |
bool | $reset = false |
||
) |
limit | ( | $limit | ) |
Defines the LIMIT for select
mixed | $limit | (limit or [offset,limit]) |
References $limit, $offset, limit(), and offset().
Referenced by __construct(), limit(), and statement().
offset | ( | int | $offset | ) |
Defines the OFFSET for select
integer | $offset |
References $offset, and offset().
Referenced by __construct(), limit(), offset(), and statement().
distinct | ( | bool | $distinct = true | ) |
Defines the DISTINCT flag for select
boolean | $distinct |
References $distinct, and distinct().
Referenced by __construct(), distinct(), and statement().
statement | ( | ) |
Returns the select statement
Reimplemented from dcSqlStatement.
References dcCore\app(), dcSqlStatement\columns(), dcSqlStatement\cond(), dcSqlStatement\count(), distinct(), dcSqlStatement\from(), group(), having(), join(), limit(), offset(), order(), dcSqlStatement\sql(), and dcSqlStatement\where().
Referenced by select().
select | ( | ) |
Run the SQL select query and return result
References dcSqlStatement\$sql, and statement().
Referenced by run().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by distinct().