From 7c761451a847060eebb110348a8987a4454c0319 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Sun, 21 Apr 2002 17:18:40 +0000 Subject: [PATCH] fixed sample added see also git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@79320 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mysql/functions/mysql-tablename.xml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/reference/mysql/functions/mysql-tablename.xml b/reference/mysql/functions/mysql-tablename.xml index 4f24b3ecf7..f2875d1484 100644 --- a/reference/mysql/functions/mysql-tablename.xml +++ b/reference/mysql/functions/mysql-tablename.xml @@ -1,5 +1,5 @@ - + @@ -24,17 +24,22 @@ "; + mysql_connect("localhost", "mysql_user", "mysql_password"); + $result = mysql_list_tables("mydb"); + + for ($i = 0; $i < mysql_num_rows($result); $i++) { + printf ("Table: %s\n", mysql_tablename($result, $i)); + + mysql_free_result($result); } ?> ]]> + + See also: mysql_list_tables. +