Thanks Chris, it was the missing where statement.
Gary
Chris Lee wrote:
> where's the form, maybe the problem is there. your update query has no where
> statment, this isnt syntaxicaly incorrect, its just rare that you need to
> update every single element in the database to the same value. everything
> else looks ok, what exactly is the error/warning ? you dont accually need
> the $conn in mysql_query() and die() is just nasty, I like a little bit more
> friendly user errors. I also like to shorten things by putting the
> mysql_query in the if() statement
>
> if ( !mysql_query($sql) )
>
> --
>
> Chris Lee
> [EMAIL PROTECTED]
>
>
>
> "Gary" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>>I have a form that has name (unique in the table), team, pick, and
>>message. The below is updating all the rows with the same updates. where
>>have I screwed up?
>>
>>
>>
>>$sql = "UPDATE cappers SET team= \"$team\", pick = \"$pick\", message =
>>\"$message\"";
>>
>>//Get Results
>>$sql_result = mysql_query($sql, $conn) or die("Couldn't Query Database");
>>
>> if(!$sql_result) {
>>
>>TIA
>>Gary
>>
>>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]