[thelist] mysql_affected_rows() question

Chris Blessing webguy at mail.rit.edu
Wed Sep 25 12:39:01 CDT 2002


Dunstan-

I think you're going about it all wrong.  You can't use
mysql_affected_rows() to execute the query itself.  You must first execute
it and then you can use the mysql_affected_rows() function to find out how
many rows were affected by the query itself.

See "Example 1. Delete-Query" on the mysql_affected_rows() doc page @
http://www.php.net/manual/en/function.mysql-affected-rows.php

Sorry I didn't point this out earlier, still absorbing the morning coffee.
:)

Chris Blessing
webguy at mail.rit.edu
http://www.330i.net

> > Did you use this:
> > > if (mysql_affected_rows(sql2))
> >
> > or this?
> > > if (mysql_affected_rows($sql2))
>
>
> I've tried both, and neither one works - same error :o/
>
>
> - dunstan (btw, I'm on digest, could you cc me please? thanks)




More information about the thelist mailing list