Re: UPDATE syntax
| From: | Steve Werby | Date: | Mon, 13 Aug 2001 20:55:01 +0000 |
| Subject: | Re: UPDATE syntax | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62500@lists.php.net to get a copy of this message | ||
"Gerard Samuel" <trini0@optonline.net> wrote:
> OK it worked, but now I have to figure out why its only updating the
> first row.....
<snip>
> Tyler Longren wrote:
> > yeah...jibberish. Should be this:
> > UPDATE mpn_asklee SET reply='$Reply[$i]', Post='$post[$i]' WHERE
> > ID='$counts'"
</snip>
If each row has a unique value for ID then it will only update a single row.
When in doubt what is happening store the SQL statement in a var like $sql
and then echo $sql to the screen to check it over, pasting into database
commandline to test results if necessary.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/