Dependency Graph View Issue Relation Graph Vertical
related to child of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0002809phpList 3 applicationGeneralpublic20-05-05 20:14
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version2.9.5 
Summary0002809: Sql_Affected_Rows missing explicit database link
DescriptionThe function Sql_Affected_Rows is missing the explicit database
connection handler:

function Sql_Affected_Rows() {
   return mysql_affected_rows();

When e.g. using custom database session save handlers, it's not
guaranteed that the last opened mysql link is the one needed by this

I've seen that Sql_Insert_id() has been fixed since, it would be nice if
Sql_Affected_Rows() could be fixed too.
TagsNo tags attached.


30-03-05 12:12 (312 bytes)
---	2005-03-30 11:07:33.000000000 +0000
+++	2005-03-30 11:08:00.000000000 +0000
@@ -166,7 +166,7 @@
 function Sql_Affected_Rows() {
-  return mysql_affected_rows();
+  return mysql_affected_rows($GLOBALS["database_connection"]);
 function Sql_Num_Rows($result = "") { (312 bytes)


30-03-05 13:19

manager   ~0004063


patching file
Hunk #1 FAILED at 166.
1 out of 1 hunk FAILED -- saving rejects to file

in this case the patch is small enough to do manually, but it would be useful to diff against the CVS code instead


30-03-05 13:59

reporter   ~0004064

I'm sorry I'm unable to do the CVS checkout. This is all I can do for this bug report, this is actually only a one-line change so I hope you're capable of doing it yourself. Thanks.


30-03-05 14:05

manager   ~0004065

Yes, in this case it's ok, but if you were to submit bigger patches, please use the cvs.


30-03-05 14:14

reporter   ~0004066

Thanks for your accommodation. I promised I will. Cheers.


31-03-05 04:29

manager   ~0004068

The new line should say:

return mysql_affected_rows($GLOBALS["database_connection"]);

Figured I'd save everyone the hassle.