Query class
This class holds all the information regarding SELECT operation, that will be used by Database class.
| package |
Default |
|---|
__construct(string $table) : void
stringName of the database table where the SELECT operation will happen
exec() : array
Execute the constructed SELECT operation
array
limit(integer $limit) : \TinyORM\Query
offset(integer $offset) : \TinyORM\Query
orderBy(string $column, string $dir = 'ASC') : \TinyORM\Query
toString() : string
Return the SQL query
string
where(string $column, string $operator, string $value = '') : \TinyORM\Query
Add where condition in this SELECT operation
stringName of the database table column
stringSQL operator =, <, >, <> etc
stringValue to the compared with the value in $column and $operator
\TinyORM\Query
table : string
| var |
Database table |
|---|
string
limit : integer
| var |
Query LIMIT |
|---|
integer
offset : integer
| var |
Query OFFSET |
|---|
integer
where : array
| var |
Query WHERE conditions |
|---|
array
orderBys : array
| var |
Query ORDER BY |
|---|
array