★ wanayoo — archive 1999 http://fr.php.net/manual/function.mysql-db-name.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to MySQL
Quick Reference
English version of this pageGerman version of this page is not availableJapanese version of this page
Italian version of this pageFrench version of this pageHungarian version of this page
Spanish version of this page is not availableDutch version of this pageBrazilian Portuguese version of this page
Korean version of this pageCzech version of this page
MySQL
* mysql_affected_rows
* mysql_change_user
* mysql_close
* mysql_connect
* mysql_create_db
* mysql_data_seek
* mysql_db_name
* mysql_db_query
* mysql_drop_db
* mysql_errno
* mysql_error
* mysql_fetch_array
* mysql_fetch_assoc
* mysql_fetch_field
* mysql_fetch_lengths
* mysql_fetch_object
* mysql_fetch_row
* mysql_field_flags
* mysql_field_name
* mysql_field_len
* mysql_field_seek
* mysql_field_table
* mysql_field_type
* mysql_free_result
* mysql_insert_id
* mysql_list_dbs
* mysql_list_fields
* mysql_list_tables
* mysql_num_fields
* mysql_num_rows
* mysql_pconnect
* mysql_query
* mysql_result
* mysql_select_db
* mysql_tablename

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: mysql_db_name
View the source code for this pageSearch the site



Previous page
 mysql_data_seek
 Updated
Mon, 08 Jan 2001
mysql_db_query 
Next page


mysql_db_name

(PHP 3>= 3.0.6, PHP 4 )

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.

Example 1. Mysql_db_name() example


<?php 
error_reporting(E_ALL);

mysql_connect('dbhost', 'username', 'password');
$db_list = mysql_list_dbs();

$i = 0;
$cnt = mysql_num_rows($db_list);
while ($i < $cnt) {
    echo mysql_db_name($db_list, $i) . "\n";
    $i++;
}
?>
     

For backward compatibility, mysql_dbname() is also accepted. This is deprecated, however.


 About Notes


Previous page
 mysql_data_seek
 Updated
Mon, 08 Jan 2001
mysql_db_query 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
France
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.