Public Member Functions | |
__construct ($query, $connection) | |
Constructor. | |
bind ($param, $no_quotes=false) | |
Escape query parameters. | |
execute () | |
Execute prepared query and return resultset methods. | |
limit ($limit) | |
Set limit int value. | |
objExecuteNonPrepared () | |
Execute non-prepared SQL query and return resultset methods. | |
offset ($offset) | |
Set offset int value. | |
sequence () | |
Dummy method to prevent class error for dbs that do not support sequences - used with prepared statement. |
Definition at line 17 of file sqliteStatement.php.
__construct | ( | $ | query, | |
$ | connection | |||
) |
Constructor.
public
str | $query | |
mixed | $connection |
Definition at line 74 of file sqliteStatement.php.
{ $this->objConnection = $connection; $this->objQuery = $query; }
bind | ( | $ | param, | |
$ | no_quotes = false | |||
) |
Escape query parameters.
public
mixed | $param | |
bool | $no_quotes |
Definition at line 87 of file sqliteStatement.php.
{ //if $param is numeric str, do not add quotes if ( ( is_string( $param ) && !is_numeric( $param ) ) && !$no_quotes ) { if ( get_magic_quotes_gpc() ) { $param = stripslashes( $param ); $param = "'" . sqlite_escape_string( $param ) . "'"; } else { $param = "'" . sqlite_escape_string( $param ) . "'"; } } $this->objParameters[] = $param; }
execute | ( | ) |
Execute prepared query and return resultset methods.
public
Definition at line 112 of file sqliteStatement.php.
{ $objResult = sqlite_query( $this->objPrepareSQL(), $this->objConnection->connection() ) or trigger_error( sqlite_error_string( sqlite_last_error( $this->objConnection->connection() ) ), E_USER_WARNING ); return new sqliteResultset( $objResult, $this->objConnection->connection() ); }
limit | ( | $ | limit | ) |
Set limit int value.
public
int | $limit |
Definition at line 126 of file sqliteStatement.php.
{ //make sure $limit is an unsigned int > 0 $this->objLimit = ( is_numeric( $limit ) && $limit > 0 ) ? ( int )$limit : 1; }
objExecuteNonPrepared | ( | ) |
Execute non-prepared SQL query and return resultset methods.
public
Definition at line 138 of file sqliteStatement.php.
{ $objResult = sqlite_query( $this->objQuery, $this->objConnection->connection() ) or trigger_error( sqlite_error_string( sqlite_last_error( $this->objConnection->connection() ) ), E_USER_WARNING ); return new sqliteResultset( $objResult, $this->objConnection->connection() ); }
offset | ( | $ | offset | ) |
Set offset int value.
public
int | $offset |
Definition at line 172 of file sqliteStatement.php.
{ //make sure $offset is an unsigned int > 0 $this->objOffset = ( is_numeric( $offset ) && $offset > 0 ) ? ( int )$offset : 1; }
sequence | ( | ) |
Dummy method to prevent class error for dbs that do not support sequences - used with prepared statement.
public
Definition at line 183 of file sqliteStatement.php.
{}