UseBB Community

UseBB support, discussion and development

mysql_affected_rows

Post Reply

Page: 1

Author Post
Moderator
Registered: Oct 2005
Posts: 502
Location: Canada
Can't seem to find this function in the UseBB $db class? I'm sure that $db->num_rows() won't do the same thing.

I need to retrieve the affected rows from an update, but I can't seem to figure how to do it without using mysql_affected_rows().
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
UseBB 1's database class hasn't got a method to call mysql(i)_affected_rows(), if you need it you'll have to add it manually.
Moderator
Registered: Oct 2005
Posts: 502
Location: Canada
Ah ok, will do.

Maybe something useful to add to 2.0?

Thanks.
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
Since v2 doesn't use any traditional extensions but only PDO, you will be able to get the number of affected rows using PDO::exec() or PDOStatement::rowCount().

Post Reply

Page: 1

UseBB Community is powered by UseBB 1 Forum Software