jDbWidget

package

jelix

subpackage

db

Methods

Constructor

__construct( $connection) 

Arguments

$connection

Get all results of a query

fetchAll(string $query, integer $limitOffset = null, integer $limitCount = null) : array

Arguments

$query

string

SQL query

$limitOffset

integer

the first number of the results or null

$limitCount

integer

number of results you want, or null

Response

array

array of objects which contains results values

Get all results of a query and store values into objects which have the given class

fetchAllInto(string $query,  $className, integer $limitOffset = null, integer $limitCount = null) : array

Arguments

$query

string

SQL query

$className

$limitOffset

integer

the first number of the results or null

$limitCount

integer

number of results you want, or null

Response

array

array of objects which contains results values

Run a query, and return only the first result.

fetchFirst(string $query) : object

Arguments

$query

string

SQL query (without LIMIT instruction !)

Response

object

the object which contains values of the record

Run a query, and store values of the first result, into an object which has the given class

fetchFirstInto(string $query, string $classname) : object

Arguments

$query

string

SQL query (without LIMIT instruction !)

$classname

string

class name of the future object

Response

object

the object which contains values of the record

Properties

a jDbConnection object

_conn : 

Type(s)