Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$db Class. Explained.
#1
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
Jimmie Lin - Community Manager & THT.Next Developer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)