php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1675 Wrong value returned
Submitted: 1999-07-07 05:20 UTC Modified: 1999-07-07 05:33 UTC
From: tite at mrbit dot es Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0.9 OS: Linux - SuSe 5.3
Private report: No CVE-ID: None
 [1999-07-07 05:20 UTC] tite at mrbit dot es
in my php code i have:
echo "<B>Numero de Base de Datos</B> : ".mysql_list_dbs($sql)."<BR>"; # ERROR                                     
echo "<B>Numero de Tablas en ifrprueba</B> : ".mysql_list_tables("ifrprueba",$sql)."<BR>"; #ERROR  

ifrprueba is a database that exists. The result of these funcions are:

Numero de Base de Datos : 5
Numero de Tablas en ifrprueba : 6

The point is that there are not 5 Databases, but 3. And there are not 6 tables in that database but 1.

bbs:/usr/local/bin # ./mysqlshow -u ifr -p              
Enter password: 
+-----------+
| Databases |
+-----------+
| ifrprueba |
| mysql     |
| test      |
+-----------+
bbs:/usr/local/bin # ./mysqlshow -u ifr -p ifrprueba
Enter password: 
Database: ifrprueba
+--------+
| Tables |
+--------+
| test   |
+--------+

Thank You.

Josafat Moragrega

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-07 05:33 UTC] sas at cvs dot php dot net
Have a look at the documentation. These functions return the _id_ to a normal result set, not the actual number of entries.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 15:01:31 2024 UTC