<?xml version="1.0"?><phpdoc><class name="DB_common" extends="" undoc="false" access="private"><file>c:/www/apache/doc2//pear/DB/common.php</file><doc><description>inherited by all such.</description><shortdescription>DB_common is a base class for DB implementations, and should be</shortdescription></doc><function name="quoteString" undoc="false" access="private"><doc><parameter name="$string" type="string">input string to quote</parameter><return name="" type="string">the quoted string</return><description>in a query.</description><shortdescription>Quotes a string so it can be safely used within string delimiters</shortdescription></doc></function><function name="provides" undoc="false" access="private"><doc><parameter name="$feature" undoc="true"/><return name="" type="bool">whether this DB implementation supports $feature</return><description>supports a given feature.</description><shortdescription>Tell whether a DB implementation or its backend extension</shortdescription></doc></function><function name="errorCode" undoc="false" access="private"><doc><parameter name="$nativecode" type="string">integer)</parameter><return name="" type="int">a portable DB error code, or FALSE if this DB&#x0a;implementation has no mapping for the given error code.</return><description>the DB implementation&amp;apos;s constructor fills in the $errorcode_mapproperty.</description><shortdescription>Map native error codes to DB&amp;apos;s portable ones.  Requires that</shortdescription></doc></function><function name="errorMessage" undoc="false" access="private"><doc><parameter name="$dbcode" undoc="true"/><return name="" type="string">the corresponding error message, of FALSE&#x0a;if the error code was unknown</return><description>just a wrapper for DB::errorMessage().</description><shortdescription>Map a DB error code to a textual message.  This is actually</shortdescription></doc></function><function name="&amp;raiseError" undoc="false" access="private"><doc><parameter name="$code" type="string" undoc="true"/><parameter name="$mode" type="boolean" undoc="true"/><parameter name="$level" type="boolean" undoc="true"/><parameter name="$debuginfo" type="boolean" undoc="true"/><parameter name="$nativecode" type="boolean" undoc="true"/><return type="void"/><description/><shortdescription>This method is called by DB to generate an error.</shortdescription></doc></function><function name="setErrorHandling" undoc="false" access="private"><doc><parameter name="$mode" type="int">of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,&#x0a;PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE or&#x0a;PEAR_ERROR_CALLBACK.</parameter><parameter name="$options" default="false" type="mixed">unless $mode is PEAR_ERROR_TRIGGER or&#x0a;PEAR_ERROR_CALLBACK.  When $mode is PEAR_ERROR_TRIGGER,&#x0a;this parameter is expected to be an integer among&#x0a;E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR.  When&#x0a;$mode is PEAR_ERROR_CALLBACK, this parameter is expected&#x0a;to be the callback function or method.  A callback&#x0a;function is a string with the name of the function, a&#x0a;callback method is an array of two elements: the element&#x0a;at index 0 is an object, and the element at index 1 is&#x0a;the name of the method to call in the object.</parameter><return type="void"/><description/><shortdescription>Sets how errors generated by this DB object should be handled.</shortdescription></doc></function><function name="setFetchMode" undoc="false" access="private"><doc><parameter name="$fetchmode" type="int">or&#x0a;DB_FETCHMODE_ASSOC, possibly bit-wise OR&amp;apos;ed with&#x0a;DB_FETCHMODE_FLIPPED.</parameter><return type="void"/><description>on this connection.</description><shortdescription>Sets which fetch mode should be used by default on queries</shortdescription></doc></function><function name="prepare" undoc="false" access="private"><doc><parameter name="$query" undoc="true"/><return type="void"/><description>PostgreSQL, this is emulated.</description><shortdescription>Prepares a query for multiple execution with execute().  With</shortdescription></doc></function><function name="execute_emulate_query" undoc="false" access="private"><doc><parameter name="$stmt" undoc="true"/><parameter name="$data" type="boolean" undoc="true"/><return name="" type="string">containing the real query run when emulating&#x0a;prepare/execute.  A DB error code is returned on failure.</return><description/><shortdescription/></doc></function><function name="executeMultiple" undoc="false" access="private"><doc><parameter name="$stmt" undoc="true"/><parameter name="&amp;$data" undoc="true"/><return type="void"/><description>statement handle.  $data must be an array indexed numericallyfrom 0, one execute call is done for every &amp;quot;row&amp;quot; in the array.If an error occurs during execute(), executeMultiple() does notexecute the unfinished rows, but rather returns that error.</description><shortdescription>This function does several execute() calls on the same</shortdescription></doc></function><function name="&amp;getOne" undoc="false" access="public"><doc><parameter name="$query" type="array">execute parameters</parameter><parameter name="$params" type="array" undoc="true"/><return type="void"/><description>a query.  Takes care of doing the query and freeing the resultswhen finished.</description><shortdescription>Fetch the first column of the first row of data returned from</shortdescription></doc></function><function name="&amp;getRow" undoc="false" access="public"><doc><parameter name="$query" undoc="true"/><parameter name="$fetchmode" type="string" undoc="true"/><parameter name="$params" type="array" undoc="true"/><return name="" type="array">the first row of results as an array indexed from&#x0a;0, or a DB error code.</return><description>of doing the query and freeing the results when finished.</description><shortdescription>Fetch the first row of data returned from a query.  Takes care</shortdescription></doc></function><function name="&amp;getCol" undoc="false" access="public"><doc><parameter name="$query" type="integer">[column number,&#x0a;starting at 0] or string [column name])</parameter><parameter name="$col" type="integer" undoc="true"/><parameter name="$params" type="array" undoc="true"/><return name="" type="array">an indexed array with the data from the first&#x0a;row at index 0, or a DB error code.</return><description>indexed array.</description><shortdescription>Fetch a single column from a result set and return it as an</shortdescription></doc></function><function name="&amp;getAssoc" undoc="false" access="public"><doc><parameter name="$query" type="array">(optional) used only when the query returns&#x0a;exactly two columns.  If true, the values of the returned array&#x0a;will be one-element arrays instead of scalars.</parameter><parameter name="$force_array" type="boolean" undoc="true"/><parameter name="$params" type="array" undoc="true"/><return name="" type="array">associative array with results from the query.&#x0a;If the result set contains more than two columns, the value&#x0a;will be an array of the values from column 2-n.  If the result&#x0a;set contains only two columns, the returned value will be a&#x0a;scalar with the value of the second column (unless forced to an&#x0a;array with the $force_array parameter).  A DB error code is&#x0a;returned on errors.  If the result set contains fewer than two&#x0a;columns, a DB_ERROR_TRUNCATED error is returned.&#x0a;&#x0a;For example, if the table &amp;quot;mytable&amp;quot; contains:&#x0a;&#x0a;ID      TEXT       DATE&#x0a;--------------------------------&#x0a;1       &amp;apos;one&amp;apos;      944679408&#x0a;2       &amp;apos;two&amp;apos;      944679408&#x0a;3       &amp;apos;three&amp;apos;    944679408&#x0a;&#x0a;Then the call getAssoc(&amp;apos;SELECT id,text FROM mytable&amp;apos;) returns:&#x0a;array(&#x0a;&amp;apos;1&amp;apos; =&amp;gt; &amp;apos;one&amp;apos;,&#x0a;&amp;apos;2&amp;apos; =&amp;gt; &amp;apos;two&amp;apos;,&#x0a;&amp;apos;3&amp;apos; =&amp;gt; &amp;apos;three&amp;apos;,&#x0a;)&#x0a;&#x0a;...while the call getAssoc(&amp;apos;SELECT id,text,date FROM mydate&amp;apos;) returns:&#x0a;array(&#x0a;&amp;apos;1&amp;apos; =&amp;gt; array(&amp;apos;one&amp;apos;, &amp;apos;944679408&amp;apos;),&#x0a;&amp;apos;2&amp;apos; =&amp;gt; array(&amp;apos;two&amp;apos;, &amp;apos;944679408&amp;apos;),&#x0a;&amp;apos;3&amp;apos; =&amp;gt; array(&amp;apos;three&amp;apos;, &amp;apos;944679408&amp;apos;)&#x0a;)&#x0a;&#x0a;Keep in mind that database functions in PHP usually return string&#x0a;values for results regardless of the database&amp;apos;s internal type.</return><description>associative array using the first column as the key.</description><shortdescription>Fetch the entire result set of a query and return it as an</shortdescription></doc></function><function name="&amp;getAll" undoc="false" access="public"><doc><parameter name="$query" undoc="true"/><parameter name="$fetchmode" type="string" undoc="true"/><parameter name="$params" type="array" undoc="true"/><return name="" type="array">an nested array, or a DB error</return><description/><shortdescription>Fetch all the rows returned from a query.</shortdescription></doc></function><function name="toString" undoc="true" access="private"><doc><return type="void"/></doc></function><function name="DB_common" undoc="true" access="public"><doc><return type="void"/></doc></function><variable name="$features" access="private" type="unknown"><doc></doc></variable><variable name="$errorcode_map" access="private" type="unknown"><doc></doc></variable><variable name="$type" access="private" type="unknown"><doc></doc></variable><variable name="$prepare_tokens" access="private" type="unknown"><doc></doc></variable><variable name="$prepare_types" access="private" type="unknown"><doc></doc></variable><variable name="$prepare_maxstmt" access="private" type="unknown"><doc></doc></variable><variable name="$error_mode" access="private" type="string">PEAR_ERROR_RETURN<doc></doc></variable><variable name="$error_level" access="private" type="string">E_USER_NOTICE<doc></doc></variable><variable name="$error_callback" access="private" type="unknown"><doc></doc></variable><variable name="$last_query" access="private" type="string">&amp;apos;&amp;apos;<doc></doc></variable><variable name="$fetchmode" access="private" type="string">DB_FETCHMODE_DEFAULT<doc></doc></variable><subclasses><subclass>DB_ibase</subclass><subclass>DB_msql</subclass><subclass>DB_mssql</subclass><subclass>DB_mysql</subclass><subclass>DB_oci8</subclass><subclass>DB_odbc</subclass><subclass>DB_pgsql</subclass><subclass>DB_sybase</subclass></subclasses></class></phpdoc>
