◆ __construct()
Initialize the database
return void
Reimplemented in OssnMessages.
◆ __destruct()
Unset the stuff that is not need once op is finished
- Returns
- void
◆ clearVars()
Clear variables to avoid passing then in other objects
- Returns
- void
◆ Connect()
Connect to database
- Returns
- boolean
◆ constructWheres()
constructWheres |
( |
array |
$array, |
|
|
|
$operator = "AND" |
|
) |
| |
Create a wheres clause for database
- Parameters
-
array | $array | A valid array containg wheres clauses; |
string | $operator | AND, OR, LIKE |
- Returns
- string
◆ delete()
Prepare a query to delete data from database
- Parameters
-
param ['from'] Names of table
- Parameters
-
param ['wheres'] Specify a selection criteria to get required records
- Returns
- boolean
Reimplemented in OssnComponents.
◆ execute()
execute |
( |
|
$values = array() | ) |
|
Execute a mysqli query and store result in memory
- Parameters
-
- Returns
- boolean
◆ fetch()
Fetch the data from memory that is stored during execution;
- Parameters
-
boolean | $data | Ture if you want to fetch all data , or false if only one row |
- Returns
- boolean
◆ generateLimit()
generateLimit |
( |
|
$data_limit = false , |
|
|
|
$page_limit = false , |
|
|
|
$offset = false |
|
) |
| |
Generate limit from options
- Parameters
-
integer | $data_limit | How much data should be fetched? |
integer | $page_limit | Limit of data on one page |
integer | $offset | Offset value |
- Returns
- string|false
◆ getLastEntry()
Get a guid of newly create entry
- Returns
- integer
◆ insert()
Prepare a query to insert data in database
- Parameters
-
param ['names'] Names of columns
- Parameters
-
param ['values'] Values that need to be inserted
- Parameters
-
param ['into'] Table name
- Returns
- boolean
◆ select()
select |
( |
|
$params, |
|
|
|
$multi = '' |
|
) |
| |
Prepare a query to select data from database
- Parameters
-
param ['from'] Names of table
- Parameters
-
param ['params'] Names of columns which you want to select
- Parameters
-
param ['wheres'] Specify a selection criteria to get required records
- Returns
- boolean
◆ statement()
Prepare a database query
- Returns
- boolean
◆ update()
update |
( |
|
$params = array() | ) |
|
Prepare a query to update data in database
- Parameters
-
param ['names'] Names of columns
- Parameters
-
param ['values'] Values that need to be updated
- Parameters
-
param ['table'] Table name
- Parameters
-
param ['wheres'] Specify a selection criteria to update required records
- Returns
- boolean
The documentation for this class was generated from the following file:
- source/classes/OssnDatabase.php