aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/driver/driver.php4
-rw-r--r--phpBB/includes/db/sql_insert_buffer.php15
2 files changed, 17 insertions, 2 deletions
diff --git a/phpBB/includes/db/driver/driver.php b/phpBB/includes/db/driver/driver.php
index 8dda94bc2c..b915ee081b 100644
--- a/phpBB/includes/db/driver/driver.php
+++ b/phpBB/includes/db/driver/driver.php
@@ -568,12 +568,12 @@ class phpbb_db_driver
* Run more than one insert statement.
*
* @param string $table table name to run the statements on
- * @param array &$sql_ary multi-dimensional array holding the statement data.
+ * @param array $sql_ary multi-dimensional array holding the statement data.
*
* @return bool false if no statements were executed.
* @access public
*/
- function sql_multi_insert($table, &$sql_ary)
+ function sql_multi_insert($table, $sql_ary)
{
if (!sizeof($sql_ary))
{
diff --git a/phpBB/includes/db/sql_insert_buffer.php b/phpBB/includes/db/sql_insert_buffer.php
index 49cf5b8ef6..6b884dd412 100644
--- a/phpBB/includes/db/sql_insert_buffer.php
+++ b/phpBB/includes/db/sql_insert_buffer.php
@@ -19,6 +19,21 @@ if (!defined('IN_PHPBB'))
* Collects rows for insert into a database until the buffer size is reached.
* Then flushes the buffer to the database and starts over again.
*
+* Usage:
+* <code>
+* $buffer = new phpbb_db_sql_insert_buffer($db, 'test_table', 1234);
+*
+* while (do_stuff())
+* {
+* $buffer->insert(array(
+* 'column1' => 'value1',
+* 'column2' => 'value2',
+* ));
+* }
+*
+* $buffer->flush();
+* </code>
+*
* @package dbal
*/
class phpbb_db_sql_insert_buffer