RE: [PHP-DB] 2 Questions... INSERT and searching records....
| From: | Rick Emery | Date: | Thu, 31 Jan 2002 19:02:23 +0000 |
| Subject: | RE: [PHP-DB] 2 Questions... INSERT and searching records.... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-16365@lists.php.net to get a copy of this message | ||
And the problem is...
You are trying to insert 8 values into 7 fields. You begin your VALUES with
"", but there is not field specified for it.
Don't blame Meloni here until you've proven her wrong.
-----Original Message-----
From: Todd Williamsen [mailto:todd@williamsen.net]
Sent: Thursday, January 31, 2002 12:43 PM
To: php-db@lists.php.net
Subject: [PHP-DB] 2 Questions... INSERT and searching records....
It seems that my insert statement doesn't want to cooperate.. I used the
same format as in Julie Meloni's book. I know, sometimes, her code doesn't
always work either.
here it is:
$sql = "INSERT INTO Jobs (id, Industry, Other, JobTitle, Description,
Location, Date)
VALUES
(\"\",
\"$id\", \"$Industry\", \"$Other\", \"$JobTitle\",
\"$Description\",
\"$Location\", \"$Date\")";
$result = @mysql_query($sql) or die("OOPS!! Couldn't Execute Query!");
?>
its not the whole code block... it dies and executes the "OOPS!! Couldn't
Execute Query!" statement.
what is wrong... anybody? Bueller?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net