For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > December 2005 > RE: [PHP-DB] SQL Insert INTO question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-DB] SQL Insert INTO question
Bastien Koert

2005-12-07, 6:56 pm

Assuming a new record

"INSERT INTO reviews (review_id, review_txt)
VALUES
($id,'$_POST[review]')";

Bastien



>From: ggirl1 <ggirl1@gmail.com>
>To: php-db@lists.php.net
>Subject: [PHP-DB] SQL Insert INTO question
>Date: Wed, 7 Dec 2005 11:59:26 -0500
>
>First time poster.....
>
>This is the problem. I want to add the value of $_POST[review] to the
>reviews table where the unique id from the reviews table equals the
>review id on my form. The statement below does not work. Should I
>use UPDATE instead?
>
>"INSERT INTO reviews (review_txt)
> VALUES
> ('$_POST[review]') WHERE review_id = $id";
>
>Marian
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com