|
CVS: phpwiki/lib DbSession.php,1.28,1.29: msg#00195web.wiki.phpwiki.checkins
Update of /cvsroot/phpwiki/phpwiki/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18422 Modified Files: DbSession.php Log Message: clarify affected rows problem Index: DbSession.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/DbSession.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -2 -b -p -d -r1.28 -r1.29 --- DbSession.php 8 Jan 2005 21:27:45 -0000 1.28 +++ DbSession.php 30 Jan 2005 23:08:22 -0000 1.29 @@ -205,5 +205,6 @@ extends DbSession . " SET sess_data=$qdata, sess_date=$time, sess_ip=$qip" . " WHERE sess_id=$qid"); - if ( ! $dbh->affectedRows() ) { // 0 (none) or -1 (failure) on mysql + $result = $dbh->Affected_Rows(); + if ( $result === false or $result < 1 ) { // 0 cannot happen, -1 (failure) on mysql $res = $dbh->query("INSERT INTO $table" . " (sess_id, sess_data, sess_date, sess_ip)" @@ -419,5 +420,6 @@ extends DbSession . " SET sess_data=$qdata, sess_date=$time, sess_ip=$qip" . " WHERE sess_id=$qid"); - if ( ! $dbh->Affected_Rows() ) { // false or int > 0 + $result = $dbh->Affected_Rows(); + if ( $result === false or $result < 1 ) { // false or int > 0 $rs = $dbh->Execute("INSERT INTO $table" . " (sess_id, sess_data, sess_date, sess_ip)" ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS: phpwiki/lib upgrade.php,1.38,1.39: 00195, Reini Urban |
|---|---|
| Next by Date: | CVS: phpwiki/lib WikiUserNew.php,1.123,1.124: 00195, Reini Urban |
| Previous by Thread: | CVS: phpwiki/lib upgrade.php,1.38,1.39i: 00195, Reini Urban |
| Next by Thread: | CVS: phpwiki/lib WikiUserNew.php,1.123,1.124: 00195, Reini Urban |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |