Re: Error?
| From: | Daniel Convissor | Date: | Wed, 02 Aug 2000 14:46:35 +0000 |
| Subject: | Re: Error? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9704@lists.php.net to get a copy of this message | ||
Hi:
Wee Chua wrote:
>
> But I have an error for "Unknown database 'Resource id #1'". Could you guys
Means you're not using the right database handle on the query.
> $db = mysql_connect("localhost", "$username", "$password");
> mysql_select_db("$dbname", $db) or die (mysql_error());
$handle = mysql_select_db("$dbname", $db) or die (mysql_error());
> $result = mysql_db_query($db, "INSERT INTO
$result = mysql_db_query($handle, "INSERT INTO
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409