Re: Multiple Inserts
| From: | CC Zona | Date: | Fri, 09 Mar 2001 12:38:14 +0000 |
| Subject: | Re: Multiple Inserts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43135@lists.php.net to get a copy of this message | ||
In article <6f.122f5779.27da26a5@aol.com>, Website4S@aol.com wrote:
> $SQLStatement = "INSERT INTO Members (Email) VALUES ('".$GetEmails[$a]
> ."')"
> or die ("Problem");
> $db = mysql_select_db($dbase, $connection);
> $SQLResult = mysql_query($SQLStatement);
Whoa, you're mixing apples with oranges. Try:
$db = mysql_select_db($dbase, $connection);
$SQLStatement = "INSERT INTO Members (Email) VALUES ('" . $GetEmails[$a] .
"')"; //removed the 'or die' portion
$SQLResult = mysql_query($SQLStatement,$connection) or die ("Problem " .
mysql_error() ); //moved 'or die' here, using more detailed info
--
CC