establishes DB connection upon initialization
Db
__construct
()
displays formatted error message
void
display_error
(string $query)
-
string
$query: the query that was attempted
checks for table relationships, both master to slave, and slave to master
array
find_links
(int $id, string $tbl, bool $master, [bool $opt = false])
-
int
$id: object id, primary key
-
string
$tbl: lnkObjectToObject DB table to check
-
bool
$opt: used for special calls to get hosts/services/contacts with "use as template" fields
-
bool
$master: = boolean, master to slave, or slave to master?
link finder for servicegroup to service relationships
string
find_service_links
(int $id)
-
int
$id: the object ID to find relationships for
void
get_command_opts
([ $type = 1])
void
get_hostservice_opts
()
void
get_tbl_opts
( $type)
void
insert_query
( $query)
executes an SQL query, returns results as an associative array OR returns NULL
mixed
query
(string $query, [bool $return = true])
-
string
$query: the SQL query to be run
-
bool
$return: do we want the data back?
void
search_query
( $tbl, $field, $keyword)
this function is not used in production
void
success
([ $msg = ''])
close DB connection upon de-initialization
void
__deconstruct
()