Re: mysql_affected_rows
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: mysql_affected_rows | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12864@lists.php.net to get a copy of this message | ||
Cheers for that Mike.
Russ
On Fri, 28 Sep 2001 12:34:20 -0400 Mike Frazer <mike@invertedmind.com> wrote:
> mysql_affected_rows doesn't use a results index as its argument like
> mysql_num_rows does, it uses the connection ID. So if you used:
>
> $connection = mysql_connect(blah blah);
>
> Then $connection would be the link_identifier (connection ID). You can
> leave the argument blank in the statement "$rowcount =
> mysql_affected_rows()"; however, beware that if you are using multiple
> connections for any reason (say, one for read, one for write) in your
> script, PHP assumes the most recently used connection ID/link ID. If you
> only use one connection for simplicity (or for system-imposed scripting
> restraints) then you can leave it blank.
>
> Mike Frazer
>
>
>
>
> "Russ Michell" <r.j.michell@apu.ac.uk> wrote in message
> news:SIMEON.10109271627.D@k1c. anglia.ac.uk...
> > Hey guys:
> >
> > I'm wanting to check that the same inserts/deletes/updates are not being
> made. As one would use
> > mysql_num_rows for a select statement, one uses mysql_affected_rows for
> all other statements.
> >
> > However what is a 'link_identifier'?? as in:
> > int mysql_affected_rows ([resource link_identifier])
> >
> > What do I need to put between the brackets of the function where I would
> simply place my result in
> > mysql_num_rows()??
> >
> > Cheers.
> > Russ
> >
> >
> > #-------------------------------------------------------#
> >
> > "Believe nothing - consider everything"
> >
> > Russ Michell
> > Anglia Polytechnic University Webteam
> > Room 1C 'The Eastings' East Road, Cambridge
> >
> > e: r.j.michell@apu.ac.uk
> > w: www.apu.ac.uk/webteam
> >
> > www.theruss.com
> >
> > #-------------------------------------------------------#
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: r.j.michell@apu.ac.uk
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#