THT Community

Full Version: $db Class. Explained.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Taking in consideration that the module documentation is still not avaliable, I came here and I will explain the $db class. Quite simple.

query() - Added in 1.0
Runs an SQL Query. Returns $sql.

num_rows() - Added in 1.0
Runs an SQL Query and returns the number of rows. Returns $sql.

fetch_array() - Added in 1.0
Runs an SQL Query and returns all the rows/columns in an array. Returns $sql.

strip(string STRIP) - Added in 1.0
Returns the exact same string but SQL Cleaned.

config(string CONFIG_NAME) - Added in 1.0
Returns the value of an Config Value. Returns $value['config_name'];

resources(string RESOURCE_NAME) - Added in 1.0
Returns the value of an Resource Value (tht_resources). Returns $value['resource_name'];

updateConfig('NAME_OF_CONFIG','VALUE') - Added in 1.0
Updates the Config Value.

updateResource('NAME_OF_RESOURCE','VALUE'); - Added in 1.0
Updates the Resource Value


More functions will be explained soon. These are the ones that I think that its needed for development. Wink