Re: Any One See where this is going wrong?
| From: | Adam Richardson | Date: | Sat, 01 May 2010 21:35:55 +0000 |
| Subject: | Re: Any One See where this is going wrong? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-304831@lists.php.net to get a copy of this message | ||
>
> $sqlStatements = "INSERT INTO guns (manufacturer, type, model, caliber,
>
condition, price, description, image_file_name, available) VALUES
('$manufacturer',
> '$type',
> '$model','$caliber','$condition','$price','$description','$image_file_name','$available');
INSERT INTO images(id, image_file) VALUES ('', '$image_file')";
Gary, the second insert has what appears to be a troublesome bit of code:
VALUES ('', '$image_file')";
Shouldn't it read:
INSERT INTO images(image_file) VALUES ('$image_file')";
That's assuming you have id set to auto-increment, so no id in the first or
second set of parentheses. Additionally, the ", before the $image_file var
would cause issues, too.
Adam
--
Nephtali: PHP web framework that functions beautifully
http://nephtaliproject.com