Location: PHPKode > scripts > BaseDB > classdb.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>db: db Class Reference</title>
<style type='text/css'>
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
	font-family: Geneva, Arial, Helvetica, sans-serif;
}
BODY,TD {
       font-size: 90%;
}
H1 {
	text-align: center;
       font-size: 160%;
}
H2 {
       font-size: 120%;
}
H3 {
       font-size: 100%;
}
CAPTION { font-weight: bold }
DIV.qindex {
	width: 100%;
	background-color: #eeeeff;
	border: 1px solid #b0b0b0;
	text-align: center;
	margin: 2px;
	padding: 2px;
	line-height: 140%;
}
DIV.nav {
	width: 100%;
	background-color: #eeeeff;
	border: 1px solid #b0b0b0;
	text-align: center;
	margin: 2px;
	padding: 2px;
	line-height: 140%;
}
DIV.navtab {
       background-color: #eeeeff;
       border: 1px solid #b0b0b0;
       text-align: center;
       margin: 2px;
       margin-right: 15px;
       padding: 2px;
}
TD.navtab {
       font-size: 70%;
}
A.qindex {
       text-decoration: none;
       font-weight: bold;
       color: #1A419D;
}
A.qindex:visited {
       text-decoration: none;
       font-weight: bold;
       color: #1A419D
}
A.qindex:hover {
	text-decoration: none;
	background-color: #ddddff;
}
A.qindexHL {
	text-decoration: none;
	font-weight: bold;
	background-color: #6666cc;
	color: #ffffff;
	border: 1px double #9295C2;
}
A.qindexHL:hover {
	text-decoration: none;
	background-color: #6666cc;
	color: #ffffff;
}
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
A.el { text-decoration: none; font-weight: bold }
A.elRef { font-weight: bold }
A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
A.codeRef:link { font-weight: normal; color: #0000FF}
A.codeRef:visited { font-weight: normal; color: #0000FF}
A:hover { text-decoration: none; background-color: #f2f2ff }
DL.el { margin-left: -1cm }
.fragment {
       font-family: Fixed, monospace;
       font-size: 95%;
}
PRE.fragment {
	border: 1px solid #CCCCCC;
	background-color: #f5f5f5;
	margin-top: 4px;
	margin-bottom: 4px;
	margin-left: 2px;
	margin-right: 8px;
	padding-left: 6px;
	padding-right: 6px;
	padding-top: 4px;
	padding-bottom: 4px;
}
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
TD.md { background-color: #F4F4FB; font-weight: bold; }
TD.mdPrefix {
       background-color: #F4F4FB;
       color: #606060;
	font-size: 80%;
}
TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
DIV.groupHeader {
       margin-left: 16px;
       margin-top: 12px;
       margin-bottom: 6px;
       font-weight: bold;
}
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
BODY {
	background: white;
	color: black;
	margin-right: 20px;
	margin-left: 20px;
}
TD.indexkey {
	background-color: #eeeeff;
	font-weight: bold;
	padding-right  : 10px;
	padding-top    : 2px;
	padding-left   : 10px;
	padding-bottom : 2px;
	margin-left    : 0px;
	margin-right   : 0px;
	margin-top     : 2px;
	margin-bottom  : 2px;
	border: 1px solid #CCCCCC;
}
TD.indexvalue {
	background-color: #eeeeff;
	font-style: italic;
	padding-right  : 10px;
	padding-top    : 2px;
	padding-left   : 10px;
	padding-bottom : 2px;
	margin-left    : 0px;
	margin-right   : 0px;
	margin-top     : 2px;
	margin-bottom  : 2px;
	border: 1px solid #CCCCCC;
}
TR.memlist {
   background-color: #f0f0f0; 
}
P.formulaDsp { text-align: center; }
IMG.formulaDsp { }
IMG.formulaInl { vertical-align: middle; }
SPAN.keyword       { color: #008000 }
SPAN.keywordtype   { color: #604020 }
SPAN.keywordflow   { color: #e08000 }
SPAN.comment       { color: #800000 }
SPAN.preprocessor  { color: #806020 }
SPAN.stringliteral { color: #002080 }
SPAN.charliteral   { color: #008080 }
.mdTable {
  width:100%;
	border: 1px solid #868686;
  background-color: #F4F4FB;
}
.mdRow {
	padding: 8px 10px;
}
.mdescLeft {
       padding: 0px 8px 4px 8px;
	font-size: 80%;
	font-style: italic;
	background-color: #FAFAFA;
	border-top: 1px none #E0E0E0;
	border-right: 1px none #E0E0E0;
	border-bottom: 1px none #E0E0E0;
	border-left: 1px none #E0E0E0;
	margin: 0px;
}
.mdescRight {
       padding: 0px 8px 4px 8px;
	font-size: 80%;
	font-style: italic;
	background-color: #FAFAFA;
	border-top: 1px none #E0E0E0;
	border-right: 1px none #E0E0E0;
	border-bottom: 1px none #E0E0E0;
	border-left: 1px none #E0E0E0;
	margin: 0px;
}
.memItemLeft {
	padding: 1px 0px 0px 8px;
	margin: 4px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-color: #E0E0E0;
	border-right-color: #E0E0E0;
	border-bottom-color: #E0E0E0;
	border-left-color: #E0E0E0;
	border-top-style: solid;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	background-color: #FAFAFA;
	font-size: 80%;
}
.memItemRight {
	padding: 1px 8px 0px 8px;
	margin: 4px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-color: #E0E0E0;
	border-right-color: #E0E0E0;
	border-bottom-color: #E0E0E0;
	border-left-color: #E0E0E0;
	border-top-style: solid;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	background-color: #FAFAFA;
	font-size: 80%;
}
.memTemplItemLeft {
	padding: 1px 0px 0px 8px;
	margin: 4px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-color: #E0E0E0;
	border-right-color: #E0E0E0;
	border-bottom-color: #E0E0E0;
	border-left-color: #E0E0E0;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	background-color: #FAFAFA;
	font-size: 80%;
}
.memTemplItemRight {
	padding: 1px 8px 0px 8px;
	margin: 4px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-color: #E0E0E0;
	border-right-color: #E0E0E0;
	border-bottom-color: #E0E0E0;
	border-left-color: #E0E0E0;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	background-color: #FAFAFA;
	font-size: 80%;
}
.memTemplParams {
	padding: 1px 0px 0px 8px;
	margin: 4px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-color: #E0E0E0;
	border-right-color: #E0E0E0;
	border-bottom-color: #E0E0E0;
	border-left-color: #E0E0E0;
	border-top-style: solid;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
       color: #606060;
	background-color: #FAFAFA;
	font-size: 80%;
}
.search     { color: #003399;
              font-weight: bold;
}
FORM.search {
              margin-bottom: 0px;
              margin-top: 0px;
}
INPUT.search { font-size: 75%;
               color: #000080;
               font-weight: normal;
               background-color: #eeeeff;
}
TD.tiny      { font-size: 75%;
}
a {
	color: #252E78;
}
a:visited {
	color: #3D2185;
}
.dirtab { padding: 4px;
          border-collapse: collapse;
          border: 1px solid #b0b0b0;
}
TH.dirtab { background: #eeeeff;
            font-weight: bold;
}
HR { height: 1px;
     border: none;
     border-top: 1px solid black;
}
</style>
</head><body>
<!-- Generated by Doxygen 1.4.4 -->

<h1>db Class Reference</h1><!-- doxytag: class="db" -->Inherited by sampledb.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a0">db</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a1">open</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a2">close</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a3">fetch_res</a> ($result_set, $result_type)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a4">last_insert_id</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a5">escape_string</a> ($string, $quotestyle='both')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a6">query</a> ($Q_str)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a7">list_tables</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a8">show_table_keys</a> ($table)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a9">optimize</a> ($table)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a10">error_no</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a11">error_str</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a12">query_to_array</a> ($Q_str, $result_type='ASSOC')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a13">select_to_array</a> ($tables, $fields= '*', $conds=null, $result_type= 'ASSOC')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a14">select_single_to_array</a> ($tables, $fields= '*', $conds=null, $result_type= 'ASSOC')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a15">select2associative_array</a> ($tables, $fields='*', $conds=null, $index_field='id', $value_fields=null, $keep_index=FALSE)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a16">select_single_value</a> ($table, $field, $conds=null)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a17">insert</a> ($table, $values, $return_id=TRUE)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a18">delete</a> ($table, $conds=null)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a19">update</a> ($table, $values, $conds=null)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a20">get_count</a> ($table)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a21">associative_array_from_q2a_res</a> ($index_field='id', $value_fields=null, $res=null, $keep_index=FALSE, $sort_keys=FALSE)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a22">array_to_str</a> ($var, $sep=',')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a23">set_error</a> ($callingfunc=null)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a24">get_fields</a> ($table, $extended_info=FALSE)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#a25">list_fields</a> ($table, $indexed_by_name=FALSE)</td></tr>

<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o0">$host</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o1">$user</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o2">$pass</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o3">$conn</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o4">$db</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o5">$dbname</a> = ''</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o6">$last_qres</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o7">$last_q2a_res</a> = array()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o8">$error</a> = array()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o9">$last_error</a> = array()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o10">$beverbose</a> = FALSE</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#o11">$autoconnect</a> = TRUE</td></tr>

<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#d0">process_conds</a> ($conds=null)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#d1">verbose</a> ($string, $callingfunc=null)</td></tr>

<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdb.html#r0">$_protect_fldname</a> = '`'</td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0"></a><!-- doxytag: member="db::db" ref="a0" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::db           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a22"></a><!-- doxytag: member="db::array_to_str" ref="a22" args="($var, $sep=',')" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::array_to_str           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>var</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>sep</em> = <code>','</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a21"></a><!-- doxytag: member="db::associative_array_from_q2a_res" ref="a21" args="($index_field='id', $value_fields=null, $res=null, $keep_index=FALSE, $sort_keys=FALSE)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::associative_array_from_q2a_res           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>index_field</em> = <code>'id'</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>value_fields</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>res</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>keep_index</em> = <code>FALSE</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>sort_keys</em> = <code>FALSE</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
return an associative array indexed by $index_field with values $value_fields from a mysqldb-&gt;select_to_array result <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$index_field default value is id </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mixed</em>&nbsp;</td><td>$value_fields (string field name or array of fields name default is null so keep all fields </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>$res the mysqldb-&gt;select_to_array result </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bool</em>&nbsp;</td><td>$keep_index if set to true then the index field will be keep in the values associated (unused if $value_fields is string) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bool</em>&nbsp;</td><td>$sort_keys will automaticly sort the array by key if set to true</td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>argument <dl compact><dt><b>Returns:</b></dt><dd>array </dd></dl>
</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a2"></a><!-- doxytag: member="db::close" ref="a2" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::close           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
close connection to previously opened database 
<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a18"></a><!-- doxytag: member="db::delete" ref="a18" args="($table, $conds=null)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::delete           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>table</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>conds</em> = <code>null</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Send a delete query to $table <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$table </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mixed</em>&nbsp;</td><td>$conds </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>int affected_rows</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a10"></a><!-- doxytag: member="db::error_no" ref="a10" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::error_no           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a11"></a><!-- doxytag: member="db::error_str" ref="a11" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::error_str           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a5"></a><!-- doxytag: member="db::escape_string" ref="a5" args="($string, $quotestyle='both')" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::escape_string           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>string</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>quotestyle</em> = <code>'both'</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
base method you should replace this one in the extended class, to use the appropriate escape func regarding the database implementation <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$quotestyle (both/single/double) which type of quote to escape </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>str</dd></dl>

<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a3"></a><!-- doxytag: member="db::fetch_res" ref="a3" args="($result_set, $result_type)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::fetch_res           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>result_set</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>result_type</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
take a resource result set and return an array of type 'ASSOC','NUM','BOTH' <dl compact><dt><b>See also:</b></dt><dd>sqlitedb or mysqldb implementation for exemple</dd></dl>

<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a20"></a><!-- doxytag: member="db::get_count" ref="a20" args="($table)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::get_count           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>table</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
get the number of row in $table <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$table table name </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>int</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a24"></a><!-- doxytag: member="db::get_fields" ref="a24" args="($table, $extended_info=FALSE)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::get_fields           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>table</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>extended_info</em> = <code>FALSE</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
return the list of field in $table <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>still here for compatibility with old version  and <dl compact><dt><b>See also:</b></dt><dd>db::list_table_fields() instead </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$table name of the sql table to work on </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bool</em>&nbsp;</td><td>$extended_info will return the result of a show field query in a query_to_array fashion </td></tr>
  </table>
</dl>
</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a17"></a><!-- doxytag: member="db::insert" ref="a17" args="($table, $values, $return_id=TRUE)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::insert           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>table</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>values</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>return_id</em> = <code>TRUE</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Send an insert query to $table <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$table </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>$values (arr(FLD=&gt;VALUE,) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bool</em>&nbsp;</td><td>$return_id the function will return the inserted_id if $return_id is true (the default value), else it'll return only true or false. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>insert id or FALSE</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a4"></a><!-- doxytag: member="db::last_insert_id" ref="a4" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::last_insert_id           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a25"></a><!-- doxytag: member="db::list_fields" ref="a25" args="($table, $indexed_by_name=FALSE)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::list_fields           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>table</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>indexed_by_name</em> = <code>FALSE</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
get the fields list of table <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>now the $indexed_by_name args won't exists anymore but will considered as TRUE in all case <dl compact><dt><b>See also:</b></dt><dd>db::list_table_fields as a replacement method </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$table </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bool</em>&nbsp;</td><td>$indexed_by_name the return array will be indexed by the fields name if set to true (default is FALSE) </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>array </dd></dl>
</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a7"></a><!-- doxytag: member="db::list_tables" ref="a7" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::list_tables           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
get the table list from $this-&gt;dbname <dl compact><dt><b>Returns:</b></dt><dd>array</dd></dl>

<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a1"></a><!-- doxytag: member="db::open" ref="a1" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::open           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
open connection to database 
<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a9"></a><!-- doxytag: member="db::optimize" ref="a9" args="($table)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::optimize           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>table</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
optimize table statement query <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$table name of the table to optimize </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>bool</dd></dl>

<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="d0"></a><!-- doxytag: member="db::process_conds" ref="d0" args="($conds=null)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::process_conds           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>conds</em> = <code>null</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
used by other methods to parse the conditions param of a QUERY. If $conds is string then nothing more is done. If it's an array, the first value (index 0) will be consider as the full condition string and all '?' will be replaced by other values in the array (sort of sprintf). You can add a number before a ? to replace it by a given index in the array like 2? <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string|array</em>&nbsp;</td><td>$conds </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a6"></a><!-- doxytag: member="db::query" ref="a6" args="($Q_str)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::query           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>Q_str</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
perform a query on the database <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$Q_str </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>= result id | FALSE</dd></dl>

<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a12"></a><!-- doxytag: member="db::query_to_array" ref="a12" args="($Q_str, $result_type='ASSOC')" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::query_to_array           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>Q_str</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>result_type</em> = <code>'ASSOC'</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
return the result of a query to an array <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$Q_str SQL query </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$result_type 'ASSOC', 'NUM' et 'BOTH' </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>array | false if no result</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a15"></a><!-- doxytag: member="db::select2associative_array" ref="a15" args="($tables, $fields='*', $conds=null, $index_field='id', $value_fields=null, $keep_index=FALSE)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::select2associative_array           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>tables</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>fields</em> = <code>'*'</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>conds</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>index_field</em> = <code>'id'</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>value_fields</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>keep_index</em> = <code>FALSE</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
just a quick way to do a select_to_array followed by a associative_array_from_q2a_res see both thoose method for more information about parameters or return values    </td>
  </tr>
</table>
<a class="anchor" name="a14"></a><!-- doxytag: member="db::select_single_to_array" ref="a14" args="($tables, $fields= '*', $conds=null, $result_type= 'ASSOC')" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::select_single_to_array           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>tables</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>fields</em> = <code>'*'</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>conds</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>result_type</em> = <code>'ASSOC'</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Same as select_to_array but return only the first row. equal to $res = select_to_array followed by $res = $res[0]; <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classdb.html#a13">select_to_array</a> for details </dd></dl>
<dl compact><dt><b>Returns:</b></dt><dd>array of fields</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a16"></a><!-- doxytag: member="db::select_single_value" ref="a16" args="($table, $field, $conds=null)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::select_single_value           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>table</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>field</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>conds</em> = <code>null</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
select a single value in database <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$table </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$field the field name where to pick-up value </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mixed</em>&nbsp;</td><td>conds </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>mixed or FALSE</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a13"></a><!-- doxytag: member="db::select_to_array" ref="a13" args="($tables, $fields= '*', $conds=null, $result_type= 'ASSOC')" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::select_to_array           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>tables</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>fields</em> = <code>'*'</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>conds</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>result_type</em> = <code>'ASSOC'</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
send a select query to $table with arr $fields requested (all by default) and with arr $conditions sample conds array is array(0=&gt;'field1 = field2','ORDER'=&gt;'field desc','GROUP'=&gt;'fld') <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string|array</em>&nbsp;</td><td>$Table </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string|array</em>&nbsp;</td><td>$fields </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string|array</em>&nbsp;</td><td>$conditions </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$res_type 'ASSOC', 'NUM' et 'BOTH' </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>array | false</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a23"></a><!-- doxytag: member="db::set_error" ref="a23" args="($callingfunc=null)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::set_error           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>callingfunc</em> = <code>null</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a8"></a><!-- doxytag: member="db::show_table_keys" ref="a8" args="($table)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::show_table_keys           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>table</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Verifier si cette methode peut s'appliquer a SQLite 
<p>
Reimplemented in sampledb.    </td>
  </tr>
</table>
<a class="anchor" name="a19"></a><!-- doxytag: member="db::update" ref="a19" args="($table, $values, $conds=null)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::update           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>table</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>values</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>conds</em> = <code>null</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Send an update query to $table <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$table </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string|array</em>&nbsp;</td><td>$values (arr(FLD=&gt;VALUE,) </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>int affected_rows or bool (depends on the database implementation (have we a query_affected_rows or not?))</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="d1"></a><!-- doxytag: member="db::verbose" ref="d1" args="($string, $callingfunc=null)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::verbose           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>string</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>callingfunc</em> = <code>null</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
print a msg on STDOUT if $this-&gt;beverbose is set to true <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$string</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="r0"></a><!-- doxytag: member="db::$_protect_fldname" ref="r0" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$_protect_fldname = '`'<code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
charactere utilisé pour proteger les noms de champs    </td>
  </tr>
</table>
<a class="anchor" name="o11"></a><!-- doxytag: member="db::$autoconnect" ref="o11" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$autoconnect = TRUE          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="o10"></a><!-- doxytag: member="db::$beverbose" ref="o10" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$beverbose = FALSE          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="o3"></a><!-- doxytag: member="db::$conn" ref="o3" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$conn = null          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
resource connection (same as $conn if not applicable)     </td>
  </tr>
</table>
<a class="anchor" name="o4"></a><!-- doxytag: member="db::$db" ref="o4" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$<a class="el" href="classdb.html">db</a> = null          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
resource db selected     </td>
  </tr>
</table>
<a class="anchor" name="o5"></a><!-- doxytag: member="db::$dbname" ref="o5" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$dbname = ''          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
selected database     </td>
  </tr>
</table>
<a class="anchor" name="o8"></a><!-- doxytag: member="db::$error" ref="o8" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$error = array()          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
array of error number and msgs     </td>
  </tr>
</table>
<a class="anchor" name="o0"></a><!-- doxytag: member="db::$host" ref="o0" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$host = null          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Db hostname     </td>
  </tr>
</table>
<a class="anchor" name="o9"></a><!-- doxytag: member="db::$last_error" ref="o9" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$last_error = array()          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
the last error array     </td>
  </tr>
</table>
<a class="anchor" name="o7"></a><!-- doxytag: member="db::$last_q2a_res" ref="o7" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$last_q2a_res = array()          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
array of last query to array results     </td>
  </tr>
</table>
<a class="anchor" name="o6"></a><!-- doxytag: member="db::$last_qres" ref="o6" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$last_qres = null          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
resource result handler     </td>
  </tr>
</table>
<a class="anchor" name="o2"></a><!-- doxytag: member="db::$pass" ref="o2" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$pass = null          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
mysql password     </td>
  </tr>
</table>
<a class="anchor" name="o1"></a><!-- doxytag: member="db::$user" ref="o1" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">db::$user = null          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
mysql username     </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li>class-db.php</ul>
<hr size="1"><address style="align: right;"><small>Generated on Mon May 8 14:38:15 2006 for db by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
Return current item: BaseDB