cvs: /phpdoc/functions msql.sgml mysql.sgml

From: Date: Mon, 19 Jul 1999 16:17:54 +0000
Subject: cvs: /phpdoc/functions msql.sgml mysql.sgml
Groups: php.dev 
Request: Send a blank email to php-dev+get-8736@lists.php.net to get a copy of this message
eschmid Mon Jul 19 16:17:54 1999 EDT Modified files: /phpdoc/functions msql.sgml mysql.sgml Log: How to deal with arguments, introduced at some point? Index: phpdoc/functions/msql.sgml diff -u phpdoc/functions/msql.sgml:1.3 phpdoc/functions/msql.sgml:1.4 --- phpdoc/functions/msql.sgml:1.3 Mon Jun 21 15:05:20 1999 +++ phpdoc/functions/msql.sgml Mon Jul 19 16:17:53 1999 @@ -20,10 +20,10 @@ Returns a positive mSQL query identifier to the query result, or false on error. <para> - msql() selects a database and executes a query on it. If the - optional link identifier isn't specified, the function will try - to find an open link to the mSQL server and if no such link is - found it'll try to create one as if + <function>msql</function> selects a database and executes a query + on it. If the optional link identifier isn't specified, the + function will try to find an open link to the mSQL server and if + no such link is found it'll try to create one as if <function>msql_connect</function> was called with no arguments (see <function>msql_connect</function>). @@ -272,6 +272,9 @@ <funcsynopsis> <funcdef>int <function>msql_fetch_array</function></funcdef> <paramdef>int <parameter>query_identifier</parameter></paramdef> + <paramdef>int + <parameter><optional>result_type</optional></parameter> + </paramdef> </funcsynopsis> <para> Returns an array that corresponds to the fetched row, or false if @@ -282,6 +285,10 @@ data in the numeric indices of the result array, it also stores the data in associative indices, using the field names as keys. <para> + The second optional argument <parameter>result_type</parameter> + in <function>msql_fetch_array</function> is a constant and can + take the following values: MSQL_ASSOC, MSQL_NUM, and MYSQL_BOTH. + <para> Be careful if you are retrieving results from a query that may return a record that contains only one field that has a value of 0 (or an empty string, or NULL). @@ -289,8 +296,9 @@ An important thing to note is that using <function>msql_fetch_array</function> is NOT significantly slower than using <function>msql_fetch_row</function>, while it provides - a significant added value. <para> For further details, also see - <function>msql_fetch_row</function> + a significant added value. + <para> + For further details, also see <function>msql_fetch_row</function> </refsect1> </refentry> @@ -346,16 +354,23 @@ <funcsynopsis> <funcdef>int <function>msql_fetch_object</function></funcdef> <paramdef>int <parameter>query_identifier</parameter></paramdef> + <paramdef>int + <parameter><optional>result_type</optional></parameter> + </paramdef> </funcsynopsis> <para> Returns an object with properties that correspond to the fetched row, or false if there are no more rows. <para> - msql_fetch_object() is similar to + <function>msql_fetch_object</function> is similar to <function>msql_fetch_array</function>, with one difference - an object is returned, instead of an array. Indirectly, that means that you can only access the data by the field names, and not by their offsets (numbers are illegal property names). + <para> + The optional second argument <parameter>result_type</parameter> + in <function>msql_fetch_array</function> is a constant and can + take the following values: MSQL_ASSOC, MSQL_NUM, and MSQL_BOTH. <para> Speed-wise, the function is identical to <function>msql_fetch_array</function>, and almost as quick as Index: phpdoc/functions/mysql.sgml diff -u phpdoc/functions/mysql.sgml:1.7 phpdoc/functions/mysql.sgml:1.8 --- phpdoc/functions/mysql.sgml:1.7 Sun Jul 11 05:36:11 1999 +++ phpdoc/functions/mysql.sgml Mon Jul 19 16:17:53 1999 @@ -335,7 +335,9 @@ <funcsynopsis> <funcdef>array <function>mysql_fetch_array</function></funcdef> <paramdef>int <parameter>result</parameter></paramdef> - <paramdef>int <parameter><optional>result_typ</optional></parameter></paramdef> + <paramdef>int + <parameter><optional>result_type</optional></parameter> + </paramdef> </funcsynopsis> <para> Returns an array that corresponds to the fetched row, or false @@ -359,7 +361,7 @@ slower than using <function>mysql_fetch_row</function>, while it provides a significant added value. <para> - The optional second argument <parameter>result_typ</parameter> in + The optional second argument <parameter>result_type</parameter> in <function>mysql_fetch_array</function> is a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and MYSQL_BOTH. <para>

« previous php.dev (#8736) next »