r70628 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70627‎ | r70628 | r70629 >
Date:13:57, 7 August 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Update outdated API documentation... (is this file even used any more?)
Modified paths:
  • /trunk/phase3/docs/database.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/database.txt
@@ -19,10 +19,9 @@
2020
2121 $dbr = wfGetDB( DB_SLAVE );
2222 $res = $dbr->select( /* ...see docs... */ );
23 -while ( $row = $dbr->fetchObject( $res ) ) {
 23+foreach ( $res as $row ) {
2424 ...
2525 }
26 -$dbr->freeResult( $res );
2726
2827 Note the assignment operator in the while condition.
2928

Follow-up revisions

RevisionCommit summaryAuthorDate
r70636Remove redundant text post r70628reedy17:41, 7 August 2010

Comments

#Comment by Catrope (talk | contribs)   14:40, 7 August 2010
-$dbr->freeResult( $res );
 
 Note the assignment operator in the while condition.

You need to update the prose too.

Status & tagging log