On Mon, Jul 13, 2009 at 16:53, Govinda<[email protected]> 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>
[email protected] || [email protected]
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