That is what I thought, so I set $db_num to another number and still came up
with the same error.

jkd


""Darren"" <[EMAIL PROTECTED]> wrote in message
9e42lj$s7b$[EMAIL PROTECTED]">news:9e42lj$s7b$[EMAIL PROTECTED]...
> I think the 0 is referring to your $db_num
> "Jonathan Duncan" <[EMAIL PROTECTED]> wrote in message
> 9e3suq$17r$[EMAIL PROTECTED]">news:9e3suq$17r$[EMAIL PROTECTED]...
> > I am making a script to access MySQL and when I run it I get this:
> >
> > Warning: 0 is not a MySQL link index in
> /sites/htdocs/php/db_listtables.php
> > on line 10
> >
> > Following is the first 10 lines of my script:
> >
> > <?
> >   $connection = mysql_connect("localhost", "user", "password") or
> > die("Couldn't connect.");
> >   $dbs = mysql_list_dbs($connection) or die("Couldn't list databases.");
> >   $db_list = "<UL>";
> >   $db_num = 0;
> >   while ($db_num < mysql_num_rows($dbs)) {
> >     $db_names[$db_num] = mysql_tablename($dbs, $db_num);
> >  $db_list .= "<LI>$db_names[$db_num]";
> >  if (($db_names[$db_num] != "mysql") && ($db_names[$db_num] !=
> "tempdata"))
> > {
> >    $tables = mysql_list_dbs($db_names[$db_num]) or die("Couldn't list
> > databases.");
> >
> > Any Ideas?  Thank you in advance!!
> >
> > Jonathan
> >
> >
> >
> > --
> > 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