3.5.2.6. Databases
File: classes/Databases.php
The Databases class provides a means of accessing database sets by name.
3.5.2.6.1. add_database
Format: result = add_database(name,server,db,user,password)
where "name" is the database set name, "server" is the server address, "db"
is the database name on that server, "user" is the database user, and
"password" is the password.
Example: $sets = $dbs->add_database($name,$server,$db,$user,$password);
This adds a new database set with the given parameters.
3.5.2.6.2. delete_database
Format: result = delete_database(id)
where "id" is the database set id.
Example: $result = $dbs->delete_database($id);
This deletes the specified database set.
3.5.2.6.3. get_database
Format: result = get_database(name,dbi)
where "name" is the database set name and "dbi" is FALSE to return an array of information
about the specified database set, or TRUE to return an instance of a Database object for
that database set. If dbi is not specified, it defaults to TRUE.
Example: $db = $dbs->get_database("ewe$server",TRUE);
This method returns an array of information about a database set, or a Database class
instance for that set.
3.5.2.6.4. get_databases
Format: result = get_databases()
Example: $sets = $dbs->get_databases();
This method returns an array of all defined database sets.
3.5.2.6.5. set_database
Format: result = set_database(id,name,server,db,user,password)
where "id" is the ID of the database set to update, "name" is the new database set name, "server" is the server address, "db"
is the database name on that server, "user" is the database user, and
"password" is the password.
Example: $result = $dbs->set_database($id,$name,$server,$db,$user,$password);
This method returns an array of all defined database sets.