Re: Mysql gives error except code executes correctly!?!
| From: | Noah Spitzer-Williams | Date: | Wed, 22 Nov 2000 03:16:20 +0000 |
| Subject: | Re: Mysql gives error except code executes correctly!?! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26571@lists.php.net to get a copy of this message | ||
yeah that was the problem, stupid stupid stupid heh
--
-----------------
The DevBoard - http://www.thedevboard.com
-----------------
http://www.alladvantage.com/go.asp?refid=BIY971
- AllAdvantage
""Kit Plummer"" <kit@aviansportal.com> wrote in message
news:NEBBIELPCLMBMMIOADNNIEDJCEAA.kit@aviansportal.com...
> you probably don't mean to do a mysql_fetch_array() on an UPDATE
> query...right?
>
> -----Original Message-----
> From: Patrick L. Olson [mailto:patrickolson@qwest.net]
> Sent: Tuesday, November 21, 2000 9:47 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Mysql gives error except code executes correctly!?!
>
>
>
> ----- Original Message -----
> From: "Noah Spitzer-Williams" <noahsw@cyberdude.com>
> To: <php-general@lists.php.net>
> Sent: Monday, November 20, 2000 5:42 AM
> Subject: [PHP] Mysql gives error except code executes correctly!?!
>
>
> > Hey guys, i have the following code for updating votes in a database:
> >
> > $uv = "v".$rating."=v".$rating."+1";
> > $usex = "sex".$csex."=sex".$csex."+1";
> > $uage = "age".$cage."=age".$cage."+1";
> > $urace = "race".$crace."=race".$crace."+1";
> > $uloc = "loc".$cloc."=loc".$cloc."+1";
> > $sql = "UPDATE pet_pics SET $uv,$usex,$uage,$urace,$uloc WHERE
> id='$id'";
> > $res = mysql_query($sql);
> > $arr = mysql_fetch_array($res);
> >
> > if i were to print the sql statement, it would read:
> > UPDATE pet_pics SET
> > v1=v1+1,sexm=sexm+1,age3=age3+1,race2=race2+1,loc4=loc4+1 where id='2'
> >
> > now sql says its not a valid result resource except when i check my
> > database, the fields have been updated!
> >
> > anyone know whats goin on here?
> >
> > -Noah
>
> I'm thinking here not sure take a look at the where id='$id'
> and what you say it prints '2'
> should it not be where id=$id
> again just thinking
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>