Join Up!
96811 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousmysql_data_seekmysql_db_querynext
Last updated: Sun, 27 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Finnish | German | Spanish

mysql_db_name

(PHP 3>= 3.0.6, PHP 4 )

mysql_db_name -- Vrátí seznam všech databází

Popis

string mysql_db_name ( resource výsledek, int záznam [, mixed field])

První parametr funkce mysql_db_name() obsahuje identifikátor volání mysql_list_dbs(). Parametr záznam určuje pořadí databáze ve výsledku.

Nastane-li chyba vrací FALSE. Použitím mysql_errno() a mysql_error() zjistíte chybovou hlášku.

Příklad 1. mysql_db_name() příklad

<?php
error_reporting(E_ALL);

mysql_connect('dbhost', 'uziv_jmeno', 'heslo');
$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++;
}
?>

Kvůli zpětné kompatibilitě lze použít i mysql_dbname(). Není to však doporučeno.

User Contributed Notes
mysql_db_name
add a note about notes
There are no user contributed notes for this page.
previousmysql_data_seekmysql_db_querynext
Last updated: Sun, 27 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST