From: Sam Reed Date: Sat, 7 Aug 2010 13:57:15 +0000 (+0000) Subject: Update outdated API documentation... (is this file even used any more?) X-Git-Tag: 1.31.0-rc.0~35651 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=8bee6b62a75d358fbff326dc701d420387e9a592;p=lhc%2Fweb%2Fwiklou.git Update outdated API documentation... (is this file even used any more?) --- diff --git a/docs/database.txt b/docs/database.txt index e80a494078..e893b41032 100644 --- a/docs/database.txt +++ b/docs/database.txt @@ -19,10 +19,9 @@ To make a read query, something like this usually suffices: $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.