<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Frameset//EN''http://www.w3.org/TR/REC-html40/frameset.dtd'> <!--NewPage--> <HTML> <HEAD> <!-- Generated by PhpDoc date: 'Mon, 11 Nov 2002 23:46:11 +0100' --> <TITLE>Docs For Class DBBroker</TITLE> <LINK REL ='stylesheet' TYPE='text/css' HREF='stylesheet.css' TITLE='Style'> </HEAD> <BODY BGCOLOR='white'> <!-- Start of Class Data --> <H2> Class DBBroker </H2> <pre> <pre><a href="../core/Object.html">Object</a> | --DBBroker</pre> </pre> <H3> Classes extended from DBBroker: </H3> <p> <b><i>Located in File: Program_Root/dbmysql.inc.php</i></b><br> </p> <hr> <!-- ========== Info from phpDoc block ========= --> <b>Database broker class for MySQL database.</b> <pre> Manages connection to database and provides database information. </pre> <UL> <LI><b>Package</b> - <CODE>db</CODE></LI> <LI><b>Access</b> - <CODE>public</CODE></LI> <LI><b>Author</b> - <CODE>Robert Bala <<a href="mailto:hide@address.com">hide@address.com</a>></CODE></LI> </UL> <hr> <!-- =========== VAR SUMMARY =========== --> <A NAME='var_summary'><!-- --></A> <TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'> <TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> <TD> <FONT SIZE='+2'><B>Class Variable Summary</B></FONT> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#$_handle'>$_handle</A></B></CODE> <BR> <blockquote> Database connection handle. </blockquote> <blockquote> Default Value: <CODE>-><-</CODE> </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#$_params'>$_params</A></B></CODE> <BR> <blockquote> Database connection params. </blockquote> <blockquote> Default Value: <CODE>-><-</CODE> </blockquote> </TD> </TR> </TABLE> <hr> <!-- =========== VAR SUMMARY =========== --> <A NAME='var_summary'><!-- --></A> <TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'> <TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> <TD> <FONT SIZE='+2'><B>Inherited Class Variable Summary</B></FONT> </TD> </TR> </TABLE> <hr> <!-- =========== INHERITED METHOD SUMMARY =========== --> <A NAME='functions_inherited'><!-- --></A> <TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'> <TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> <TD> <FONT SIZE='+2'><B>Inherited Method Summary</B></FONT> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <FONT SIZE='+2'><B>Inherited From Class <a href="../core/Object.html">Object</a></B></FONT> <blockquote> <TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='95%'> <tr> <th>Function</th> <th>Description</th> </tr> <tr> <td><CODE><B><A HREF='../core/Object.html#constructor Object'>constructor Object ( )</A></B></CODE></td> <td>Object class constructor.</td> <tr> <td><CODE><B><A HREF='../core/Object.html#classMethods'>classMethods ( )</A></B></CODE></td> <td>Retrieves the class methods names of the object.</td> <tr> <td><CODE><B><A HREF='../core/Object.html#className'>className ( )</A></B></CODE></td> <td>Retrieves the name of the class of the object.</td> <tr> <td><CODE><B><A HREF='../core/Object.html#classParent'>classParent ( )</A></B></CODE></td> <td>Retrieves the parent class name for the object.</td> <tr> <td><CODE><B><A HREF='../core/Object.html#classProperties'>classProperties ( )</A></B></CODE></td> <td>Retrieves the class properties names of the object.</td> <tr> <td><CODE><B><A HREF='../core/Object.html#inheritsFrom'>inheritsFrom ( [$class = ] )</A></B></CODE></td> <td>Check if the objects inherits from the specified class.</td> </table> </blockquote> </TD> </TR> </TABLE> <br> <!-- should have constructor at some point --> <!-- =========== Method SUMMARY =========== --> <A NAME='Method_summary'><!-- --></A> <TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'> <TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> <TD> <FONT SIZE='+2'><B>Method Summary</B></FONT> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#constructor DBBroker'>void constructor DBBroker ( [$params = ''] )</A></B></CODE> <BR> <blockquote> DBBroker class constructor. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#close'>mixed close ( )</A></B></CODE> <BR> <blockquote> Closes database connection. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#getHandle'>mixed getHandle ( )</A></B></CODE> <BR> <blockquote> Gets database connection handle. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#getParam'>string getParam ( $param )</A></B></CODE> <BR> <blockquote> Gets the database connection param. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#isOpened'>boolean isOpened ( )</A></B></CODE> <BR> <blockquote> Finds whether the database connection is opened. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#open'>mixed open ( )</A></B></CODE> <BR> <blockquote> Opens database connection. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#query'>mixed &query ( $query )</A></B></CODE> <BR> <blockquote> Performs database query. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#setParam'>mixed setParam ( $param, $value )</A></B></CODE> <BR> <blockquote> Sets the database connection param. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#tableCount'>mixed tableCount ( )</A></B></CODE> <BR> <blockquote> Retrieves the table count in the database. </blockquote> </TD> </TR> <!-- =========== Summary =========== --> <TR BGCOLOR='white' CLASS='TableRowColor'> <TD> <CODE><B><A HREF='DBBroker.html#tableNames'>mixed tableNames ( )</A></B></CODE> <BR> <blockquote> Retrieves the table names in the database. </blockquote> </TD> </TR> </TABLE> <hbr> <!-- ============ VARIABLE DETAIL =========== --> <A NAME='variable_detail'></A> <TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'> <TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> <TD> <FONT SIZE='+2'><B>Variable Detail</B></FONT> </TD> </TR> </TABLE> <A NAME='$_handle'><!-- --></A><H3>$_handle</H3> <b>Data type:</b> mixed<br> <!-- ========== Info from phpDoc block ========= --> <b>Database connection handle.</b> <pre> </pre> <UL> <LI><b>Access</b> - <CODE>private</CODE></LI> </UL> <HR> <A NAME='$_params'><!-- --></A><H3>$_params</H3> <b>Data type:</b> array<br> <!-- ========== Info from phpDoc block ========= --> <b>Database connection params.</b> <pre> </pre> <UL> <LI><b>Access</b> - <CODE>private</CODE></LI> </UL> <HR> <hr> <!-- ============ FUNCTION DETAIL =========== --> <A NAME='function_detail'></A> <TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'> <TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> <TD> <FONT SIZE='+2'><B>Method Detail</B></FONT> </TD> </TR> </TABLE> <A NAME='constructor DBBroker'><!-- --></A><H3>constructor DBBroker</H3> <P><B>void constructor DBBroker ( [$params = ''] )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>DBBroker class constructor.</b> <pre> Creates the new instance of DBBroker class and sets up connection properties. </pre> <DL> <DT>Function Parameters:</DT> <DD><CODE>- <i>array $params</i>: the database connection params, defaults to "".</CODE></DD> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='close'><!-- --></A><H3>close</H3> <P><B>mixed close ( )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Closes database connection.</b> <pre> If called when the database connection is closed or it couldn't be closed, it returns error object, otherwise it returns true. </pre> <DL> <DT>Function Parameters:</DT> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='getHandle'><!-- --></A><H3>getHandle</H3> <P><B>mixed getHandle ( )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Gets database connection handle.</b> <pre> Returns resource handle if the database connection is opened, null otherwise. </pre> <DL> <DT>Function Parameters:</DT> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='getParam'><!-- --></A><H3>getParam</H3> <P><B>string getParam ( $param )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Gets the database connection param.</b> <pre> Returns the database connection param, or empty string. </pre> <DL> <DT>Function Parameters:</DT> <DD><CODE>- <i>string $param</i>: the database connection param name.</CODE></DD> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='isOpened'><!-- --></A><H3>isOpened</H3> <P><B>boolean isOpened ( )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Finds whether the database connection is opened.</b> <pre> Returns true if the database connection is established, false otherwise. </pre> <DL> <DT>Function Parameters:</DT> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='open'><!-- --></A><H3>open</H3> <P><B>mixed open ( )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Opens database connection.</b> <pre> If called when the databse is already connected, it returns error object otherwise it returns true. </pre> <DL> <DT>Function Parameters:</DT> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='query'><!-- --></A><H3>query</H3> <P><B>mixed &query ( $query )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Performs database query.</b> <pre> If called when the database connection is closed, it returns error object otherwise it returns the <a href="../db/DBQuery.html">DBQuery</a> object containing results of the last query performed on the database or a error object with an error message on any kind of failure. If the query is not a cursor, the number of affected rows is returned. </pre> <DL> <DT>Function Parameters:</DT> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='setParam'><!-- --></A><H3>setParam</H3> <P><B>mixed setParam ( $param, $value )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Sets the database connection param.</b> <pre> Returns true on success or error object with an error message on any kind of failure. </pre> <DL> <DT>Function Parameters:</DT> <DD><CODE>- <i>string $handle</i>: the database connection param name.</CODE></DD> <DD><CODE>- <i>string $value</i>: the database connection param value.</CODE></DD> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='tableCount'><!-- --></A><H3>tableCount</H3> <P><B>mixed tableCount ( )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Retrieves the table count in the database.</b> <pre> If called when the database connection is closed, it returns error object otherwise it returns the table count in the database or a error object with an error message on any kind of failure. </pre> <DL> <DT>Function Parameters:</DT> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <A NAME='tableNames'><!-- --></A><H3>tableNames</H3> <P><B>mixed tableNames ( )</B></P> <P></P> <!-- ========== Info from phpDoc block ========= --> <b>Retrieves the table names in the database.</b> <pre> If called when the database connection is closed, it returns error object otherwise it returns the array containing names of the tables in the database or a error object with an error message on any kind of failure. </pre> <DL> <DT>Function Parameters:</DT> <DT>Function Info:</DT> <DD><b>Access</b> - <CODE>public</CODE></DD> </DL> <HR> <hr> </HTML>