dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6638c5
)
Update outdated API documentation... (is this file even used any more?)
author
Sam Reed
<reedy@users.mediawiki.org>
Sat, 7 Aug 2010 13:57:15 +0000
(13:57 +0000)
committer
Sam Reed
<reedy@users.mediawiki.org>
Sat, 7 Aug 2010 13:57:15 +0000
(13:57 +0000)
docs/database.txt
patch
|
blob
|
history
diff --git
a/docs/database.txt
b/docs/database.txt
index
e80a494
..
e893b41
100644
(file)
--- 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.