From 8bee6b62a75d358fbff326dc701d420387e9a592 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 7 Aug 2010 13:57:15 +0000 Subject: [PATCH] Update outdated API documentation... (is this file even used any more?) --- docs/database.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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. -- 2.20.1