Re: 'mysql_list_tables' broken with PHP4?
| From: | Angus McIntyre | Date: | Fri, 22 Dec 2000 17:59:26 +0000 |
| Subject: | Re: 'mysql_list_tables' broken with PHP4? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31602@lists.php.net to get a copy of this message | ||
At 8:17 pm -0800 21/12/00, Matthew Ballard wrote:
[ ... 'mysql_list_tables' returned an empty result ... ]
I don't know why it's not working for you (it works for me on Win2k with 4.0.4), but a workaround would be to use the query 'show tables' and then you can use the results like you would any other query.Thanks for the suggestion: in the course of trying this, I stumbled over the _real_ problem, which turned out to be a MySQL privileges issue, and nothing to do with PHP at all. It seems that in recent builds MySQL has gotten a little pickier about what it will let people do, so that stuff you could do with a certain set of privileges in the past won't necessarily work on newer versions. Moral: if you're getting empty results where you don't expect them, log onto 'mysql' as the user your PHP script runs as, and see if it has access to everything you expect it to. Thanks for the help A -- angus@pobox.com http://pobox.com/~angus