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().
_______________
Page: 1
| Author | Post |
|---|---|
|
#1 Fri Jun 29, 2007 1:46 am
|
|
Moderator
![]() Registered: Oct 2005
Posts: 425
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(). _______________ |
|
#2 Fri Jun 29, 2007 11:48 am
|
|
|
Developer
Registered: Apr 2004
Posts: 2180
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.
_______________ |
|
#3 Fri Jun 29, 2007 1:23 pm
|
|
Moderator
![]() Registered: Oct 2005
Posts: 425
Location: canada
|
Ah ok, will do.
Maybe something useful to add to 2.0? Thanks. _______________ |
|
#4 Fri Jun 29, 2007 4:18 pm
|
|
|
Developer
Registered: Apr 2004
Posts: 2180
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().
_______________ |
Page: 1
UseBB Community is powered by UseBB 1 Forum Software