From 0f51802abb089b6eaebca504389e8d47468a4896 Mon Sep 17 00:00:00 2001 From: John Coggeshall Date: Thu, 15 May 2003 09:59:23 +0000 Subject: [PATCH] Documented 6 more functions of the MySQLi extension git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@127085 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../mysqli/functions/mysqli-field-count.xml | 10 ++++++--- reference/mysqli/functions/mysqli-kill.xml | 8 ++++--- reference/mysqli/functions/mysqli-query.xml | 16 +++++++++++--- .../mysqli/functions/mysqli-real-query.xml | 16 +++++++++++--- .../mysqli/functions/mysqli-store-result.xml | 16 +++++++++++--- .../mysqli/functions/mysqli-thread-id.xml | 15 ++++++++++--- .../mysqli/functions/mysqli-use-result.xml | 21 ++++++++++++++++--- 7 files changed, 81 insertions(+), 21 deletions(-) diff --git a/reference/mysqli/functions/mysqli-field-count.xml b/reference/mysqli/functions/mysqli-field-count.xml index 634383bc75..a3d9d4da8b 100644 --- a/reference/mysqli/functions/mysqli-field-count.xml +++ b/reference/mysqli/functions/mysqli-field-count.xml @@ -1,9 +1,9 @@ - + mysqli_field_count - + Returns the number of columns for the most recent query Description @@ -12,7 +12,11 @@ resourcelink -&warn.undocumented.func; + Returns the number of columns for the most recent query on the connection + represented by the link parameter. This function + can be useful when using the mysqli_store_result + to determine if the query should have produced a non-empty result set or + not without knowing the nature of the query. diff --git a/reference/mysqli/functions/mysqli-kill.xml b/reference/mysqli/functions/mysqli-kill.xml index 2a34d8743e..6ac8637481 100644 --- a/reference/mysqli/functions/mysqli-kill.xml +++ b/reference/mysqli/functions/mysqli-kill.xml @@ -1,9 +1,9 @@ - + mysqli_kill - + Ask the server to kill a MySQL thread Description @@ -13,7 +13,9 @@ intprocessid -&warn.undocumented.func; + This function is used to ask the server to kill a MySQL thread specified + by the processid parameter. This value must be + retrieved by calling the mysqli_thread_id function. diff --git a/reference/mysqli/functions/mysqli-query.xml b/reference/mysqli/functions/mysqli-query.xml index 5230f99104..a07984e34c 100644 --- a/reference/mysqli/functions/mysqli-query.xml +++ b/reference/mysqli/functions/mysqli-query.xml @@ -1,9 +1,9 @@ - + mysqli_query - + Performs a query on the database Description @@ -14,7 +14,17 @@ intresultmode -&warn.undocumented.func; + The mysqli_query function is used to simplify the + act of performing a query against the database represented by the + link parameter. Functionally, using this + function is identical to calling mysqli_real_query + followed either mysqli_use_result or + mysqli_store_result where query + is the query string itself and resultmode is + either the constant MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT depending + on the desired behavior. By default, if the + resultmode is not provided MYSQLI_STORE_RESULT + is used. diff --git a/reference/mysqli/functions/mysqli-real-query.xml b/reference/mysqli/functions/mysqli-real-query.xml index 32579c3a64..631d44c4aa 100644 --- a/reference/mysqli/functions/mysqli-real-query.xml +++ b/reference/mysqli/functions/mysqli-real-query.xml @@ -1,9 +1,9 @@ - + mysqli_real_query - + Execute an SQL query Description @@ -13,8 +13,18 @@ stringquery -&warn.undocumented.func; + The mysqli_real_query function is used to execute + only a query against the database represnted by the link + whose result can then be retrieved or stored using the + mysqli_store_result or mysqli_use_result + functions. + + + In order to determine if a given query should return a result set or not, + see mysqli_field_count. + + diff --git a/reference/mysqli/functions/mysqli-store-result.xml b/reference/mysqli/functions/mysqli-store-result.xml index 73343a37dc..62f17849e4 100644 --- a/reference/mysqli/functions/mysqli-store-result.xml +++ b/reference/mysqli/functions/mysqli-store-result.xml @@ -1,9 +1,9 @@ - + mysqli_store_result - + Transfers a result set from the last query Description @@ -12,8 +12,18 @@ resourcelink -&warn.undocumented.func; + Transfers the result set from the last query on the database connection + represented by the link parameter to be used with + the mysqli_data_seek function. + + + Although it is always good practice to free the memory used by the result of + a query using the mysqli_free_result function, when + transfering large result sets using the mysqli_store_result + this becomes particularly important. + + diff --git a/reference/mysqli/functions/mysqli-thread-id.xml b/reference/mysqli/functions/mysqli-thread-id.xml index abeb34a3e5..a8efcd1394 100644 --- a/reference/mysqli/functions/mysqli-thread-id.xml +++ b/reference/mysqli/functions/mysqli-thread-id.xml @@ -1,9 +1,9 @@ - + mysqli_thread_id - + Returns the thread ID for the current connection Description @@ -12,8 +12,17 @@ resourcelink -&warn.undocumented.func; + The mysqli_thread_id function returns the thread + ID for the current connection which can then be killed using the + mysqli_kill function. + + + The thread ID is assigned on a connection-by-connection basis. Hence, + if the connection is broken and then re-established a new thread ID + will be assigned. + + diff --git a/reference/mysqli/functions/mysqli-use-result.xml b/reference/mysqli/functions/mysqli-use-result.xml index 9f88102f95..92fdee8f19 100644 --- a/reference/mysqli/functions/mysqli-use-result.xml +++ b/reference/mysqli/functions/mysqli-use-result.xml @@ -1,9 +1,9 @@ - + mysqli_use_result - + Initiate a result set retrieval Description @@ -12,8 +12,23 @@ resourcelink -&warn.undocumented.func; + mysqli_use_result is used to initiate the retrieval + of a result set from the last query executed using the + mysqli_real_query function on the database connection + specified by the link parameter. Either this or the + mysqli_store_result must be called before the + results of a query can be retrieved, and one or the other must be called + to prevent the next query on that database connection from failing. + + + The mysqli_use_result function does not transfer + the entire result set from the database and hence cannot be used functions + such as mysqli_data_seek to move to a particular + row within the set. To use this functionality, the result set must be + stored using mysqli_store_result + +