Re: MySQL query results
| From: | Rasmus Lerdorf | Date: | Sat, 23 Mar 2002 00:20:57 +0000 |
| Subject: | Re: MySQL query results | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89792@lists.php.net to get a copy of this message | ||
But did you read the documentation? It states:
int mysql_affected_rows ( [resource link_identifier])
That's an optional link identifier. You don't feed it a result resource.
Just call it without any arguments. The affected rows is tied to a
database connection, not a result set.
-Rasmus
On Fri, 22 Mar 2002, Ashley M. Kirchner wrote:
> Rasmus Lerdorf wrote:
>
> >
> > http://www.php.net/manual/en/function.mysql-affected-rows.php
>
> Thanks Rasmus. I did try that as well, same result. If I don't bother with the
> $result, everything's fine. Like I said, the query runs, and gets executed. The DB
> field gets changed as it should and all. $result is always 1 (since the query is
> syntactically valid). But, if I run mysql_affected_rows($result), that's when I run
> into an error.
>
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
> +--------------------------------------------------------------------
> Ashley M. Kirchner <mailto:ashley@pcraft.com> .
> 303.442.6410 x130
> IT Director / SysAdmin / WebSmith . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
> http://www.pcraft.com ..... . . . Boulder, CO
> 80303, U.S.A.
>
>
>