\DB

DB Class

$users = $db->select('*')->from('users')->where('id>1')->limit(100)->orderby('username')->fetchAll();

Summary

Methods
Properties
Constants
setConfig()
getPDO()
quote()
query()
select()
from()
where()
limit()
orderby()
insert()
req()
fetchAll()
fetch()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

setConfig()

setConfig(\string  $dsn, \string  $username, \string  $password, array  $options = array()) 

Set config

Parameters

\string $dsn
\string $username
\string $password
array $options

getPDO()

getPDO() 

Get raw PDO instance

quote()

quote(\string  $q) 

Parameters

\string $q

query()

query(\string  $query) 

Set SQL Query

Parameters

\string $query

select()

select(\string  $what = '*') 

$users = $db->select('*')->from('users')->where('id>1')->limit(100)->orderby('username')->fetchAll();

Parameters

\string $what

from()

from(\string  $what) 

$users = $db->select('*')->from('users')->where('id>1')->limit(100)->orderby('username')->fetchAll();

Parameters

\string $what

where()

where(\string  $what = '1=1') 

$users = $db->select('*')->from('users')->where('id>1')->limit(100)->orderby('username')->fetchAll();

Parameters

\string $what

limit()

limit(\string  $what = '100') 

$users = $db->select('*')->from('users')->where('id>1')->limit(100)->orderby('username')->fetchAll();

Parameters

\string $what

orderby()

orderby(\string  $what = 'id') 

$users = $db->select('*')->from('users')->where('id>1')->limit(100)->orderby('username')->fetchAll();

Parameters

\string $what

insert()

insert(\string  $what, array  $values) 

Parameters

\string $what
array $values

req()

req() 

Get SQL Query

fetchAll()

fetchAll() 

fetch()

fetch()