http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70628
Revision: 70628 Author: reedy Date: 2010-08-07 13:57:15 +0000 (Sat, 07 Aug 2010) Log Message: ----------- Update outdated API documentation... (is this file even used any more?) Modified Paths: -------------- trunk/phase3/docs/database.txt Modified: trunk/phase3/docs/database.txt =================================================================== --- trunk/phase3/docs/database.txt 2010-08-07 12:45:10 UTC (rev 70627) +++ trunk/phase3/docs/database.txt 2010-08-07 13:57:15 UTC (rev 70628) @@ -19,10 +19,9 @@ $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( /* ...see docs... */ ); -while ( $row = $dbr->fetchObject( $res ) ) { +foreach ( $res as $row ) { ... } -$dbr->freeResult( $res ); Note the assignment operator in the while condition. _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs