Re: 2 Questions... INSERT and searching records....
| From: | Jason Wong | Date: | Thu, 31 Jan 2002 18:47:10 +0000 |
| Subject: | Re: 2 Questions... INSERT and searching records.... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16364@lists.php.net to get a copy of this message | ||
On Friday 01 February 2002 02:42, Todd Williamsen wrote:
> 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?
Try using single quotes:
$sql = "INSERT INTO Jobs (id, Industry, Other, JobTitle, Description,
Location, Date)
VALUES
('',
'$id', '$Industry', '$Other', '$JobTitle',
'$Description',
'$Location', '$Date')";
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
To fear love is to fear life, and those who fear life are already three
parts dead.
-- Bertrand Russell
*/