Re: trying to dump out table info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 13, 2009 at 16:53, Govinda<govinda.webdnatalk@xxxxxxxxx> wrote:
> Hi all
>
> I am not sure why this is failing/giving error.  I am quite new at
> PHP/Mysql, and apologize for what will undoubtedly end up being a trivial
> error on my part.

    Hey, I recognize that code.... ;-P

> Here is my code:
>
> $db_billing=mysql_connect(localhost,metheuser,mypass,billing);
> if (!$db_billing) { die('Could not connect: ' . mysql_error()); }
>
>        $sql = "SHOW TABLES";
>
>        $result = mysql_query($sql) or die(mysql_error());

    Note the addition to the $result definition.  This will cause the
script to exit with the MySQL error message (if any) if the issue is
in the query.

-- 
</Daniel P. Brown>
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux