The query class used to obtain data from the database.

package webkdb
author thg2oo6
copyright Copyright (c) 2012
version 1.0
access public

 Methods

Constructs the query element.

__construct(resource $connection) 

Parameters

$connection

resource

Destroys the instance of the class.

__destruct() 

Returns the string representation of the query.

__toString() : string

Returns

string

Tests to see if the last executed has errors or not.

error() : boolean

Returns

boolean

Returns the error code of the executed query.

error_no() : integer

Returns

integer

Returns the error string of the executed query.

error_str() 

returns string

Returns the ID of the sql insert query.

insert_id() : integer

Returns

integer

Returns the string of the last query.

last_query() : string

Returns

string

Returns the result of the query to be executed.

query(\$sql $sql) : mixed

Parameters

$sql

\$sql

The sql query string to be executed.

Returns

mixed

 Properties

 

The connection with the database.

$_connection : \mysqli

 

The last query executed.

$_query : mixed

 

The string of last query executed.

$_query_str : string