diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-09-28 02:30:32 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-09-28 02:30:32 +0000 |
commit | b1190c11b5551f20a99514bf2b0719b74449277d (patch) | |
tree | 1c9f62e1b67ab1950c95944862d8fd1120c54291 /includes | |
parent | b095783699dc4d912da49000941b10bae6778037 (diff) | |
download | brdo-b1190c11b5551f20a99514bf2b0719b74449277d.tar.gz brdo-b1190c11b5551f20a99514bf2b0719b74449277d.tar.bz2 |
- Patch #924686 by mikey_p, munzirtaha: space required after foreach construct.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/database/database.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc index 3e24225da..6d4c64a74 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -41,7 +41,7 @@ * @code * $result = db_query_range('SELECT n.nid, n.title, n.created * FROM {node} n WHERE n.uid = :uid', 0, 10, array(':uid' => $uid)); - * foreach($result as $record) { + * foreach ($result as $record) { * // Perform operations on $node->title, etc. here. * } * @endcode @@ -50,7 +50,8 @@ * out into an argument passed to db_query() so that SQL injection attacks * from user input can be caught and nullified. The LIMIT syntax varies between * database servers, so that is abstracted into db_query_range() arguments. - * Finally, note the PDO-based ability to foreach() over the result set. + * Finally, note the PDO-based ability to iterate over the result set using + * foreach (). * * All queries are passed as a prepared statement string. A * prepared statement is a "template" of a query that omits literal or variable |