Re: trying to dump out table info

From: Date: Mon, 13 Jul 2009 20:58:28 +0000
Subject: Re: trying to dump out table info
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-46291@lists.php.net to get a copy of this message
On Mon, Jul 13, 2009 at 16:53, Govinda<govinda.webdnatalk@gmail.com> 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@parasane.net || danbrown@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig

« previous php.db (#46291) next »