Database
Please note: This page is under construction and has not been finished yet.
Introduction
Use the following to retrieve the database class object
Basic database methods
select()
Selecting data from a database table
Example #1: Simple select
Example #2: Using arguments
Example #3: Using arguments with noWhere option
Example #4: BIND support
fetch()
Selecting, looping through and displaying selected data with the fetch() method:
insert()
Inserting data into a database table:
update()
Updating information in a database:
retrieve()
Combined select() and fetch() method.
Example #1: Get a single value
Example #2: Get multiple table-row values
Example #3: Fetch all, don't append WHERE to the query, index by user_id, noWhere auto detected (string starts with upper case ORDER)
Example #4: Same as above but retrieve() is only used to fetch, not useable for single return value
Example #5: Using whole query example, in this case default mode is 'one'
Example #6: Using whole query example, multi mode - $fields argument mapped to $multi
delete()
Delete a record from a database table.
gen()
Generic query function to use various SQL commands.
Example: perform a JOIN with gen():
Advanced database methods
connect()
count()
database()
getLastErrorNumber()
getLastErrorText()
Last updated