OK, I have found some more time to work on my PHP project.  The problem is
indicated in the following line:

$tables = mysql_list_tables($db_names[$db_num]) or die("Couldn't list
databases.");

I took the variable $db_num and replaced it with a value of 1 as follows:

$tables = mysql_list_tables($db_names[1]) or die("Couldn't list
databases.");

The output gave me the following results:

The value of db_list is:
        mysql
        test
        twignud
The value of dbs is: Resource id #2
The value of db_num is: 3

If I replace $db_num with a value of 0, 2 or 3 I get "Couldn't list
databases."

Any ideas anyone?  Julie?  Miles?  Could this have anything to do with mysql
user permission?

Thanks,
jkd


""Jonathan Duncan"" <[EMAIL PROTECTED]> wrote in message
9eekpb$s41$[EMAIL PROTECTED]">news:9eekpb$s41$[EMAIL PROTECTED]...
> YES!!  I just had a feeling the book was wrong.  That did get rid of the
> error.  However, it did not completely solve my issue.  Now when I run the
> script I just get the message "Couldn't list databases."  This just
happens
> to be the die message for the same line of code that I have been looking
at:
>
>    $tables = mysql_list_tables($db_names[$db_num]) or die("Couldn't list
> databases.");
>
> It is almost as if it is not being able to even list the tables from the
> databases.  I am working right now on just listing the tables of a
database
> to see what happens.
>
> Thank you,
> jkd
>
>
> "Julie Meloni" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I believe you want to look at this page:
> > http://www.thickbook.com/books/phpfe_errata.phtml
> >
> >
> >
> > --
> > +----------------------------------------+
> > | Julie Meloni ([EMAIL PROTECTED])     |
> > |                                        |
> > | "PHP Essentials" and "PHP Fast & Easy" |
> > |       http://www.thickbook.com         |
> > +----------------------------------------+
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to