From 7fdd4c38f599fc01dad80457c0660d40f107abc5 Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Mon, 11 Sep 2000 19:11:41 +0000 Subject: [PATCH] Documented mysql(), mysql_db_name(), and mysql_dbname(). Fixed a typo. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32501 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/mysql.xml | 109 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/functions/mysql.xml b/functions/mysql.xml index e67bfcf711..fdd56f5333 100644 --- a/functions/mysql.xml +++ b/functions/mysql.xml @@ -27,6 +27,32 @@ + + + mysql + Send a MySQL query + + + Description + + + int mysql + string database + string query + int + + link_identifier + + + + + + mysql is an alias for + mysql_db_query. + + + + mysql_affected_rows @@ -355,6 +381,87 @@ + + + mysql_dbname + Get result data + + + Description + + + int mysql_dbname + int result + int row + mixed + + field + + + + + + mysql_dbname is an alias for + mysql_db_name. + + + + + + + mysql_db_name + Get result data + + + Description + + + int mysql_db_name + int result + int row + mixed + + field + + + + + + mysql_db_name takes as its first parameter + the result pointer from a call to + mysql_list_dbs. The + row parameter is an index into the result + set. + + + + If an error occurs, FALSE is returned. Use + mysql_errno and + mysql_error to determine the nature of the + error. + + + + <function>Mysql_db_name</function> example + +<?php +error_reporting(E_ALL); + +mysql_connect('dbhost', 'username', 'password'); +$db_list = mysql_list_dbs(); + +$i = 0; +$cnt = mysql_numrows($db_list); +while ($i < $cnt) { + echo mysql_db_name($db_list, $i) . "\n"; + $i++; +} +?> + + + + + mysql_db_query @@ -1603,7 +1710,7 @@ $result = mysql_query ("SELECT my_col FROM my_tbl") specifying a fieldname or tablename.fieldname argument. - Calls mysql_result should not be mixed + Calls to mysql_result should not be mixed with calls to other functions that deal with the result set.