From 1b67e804224a4477031da03ff5108c621cf6d13b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 28 Jul 2008 13:37:16 +0000 Subject: [PATCH] marge git-svn-id: file:///svn/phpbb/trunk@8696 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 31 +++++++++++++- phpBB/includes/db/dbal.php | 63 ++++++++++++++-------------- phpBB/includes/diff/diff.php | 19 +++++---- phpBB/includes/diff/engine.php | 20 +++++---- phpBB/includes/diff/renderer.php | 28 +++++++++++-- phpBB/includes/functions.php | 5 +++ phpBB/includes/functions_jabber.php | 6 +-- phpBB/includes/functions_posting.php | 2 +- phpBB/includes/session.php | 2 +- phpBB/viewtopic.php | 2 +- 10 files changed, 118 insertions(+), 60 deletions(-) diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 961088a381..f88dbd480c 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -690,7 +690,29 @@ $sql = 'UPDATE ' . SOME_TABLE . ' $db->sql_query($sql); -

The $db->sql_build_array() function supports the following modes: INSERT (example above), INSERT_SELECT (building query for INSERT INTO table (...) SELECT value, column ... statements), MULTI_INSERT (for returning extended inserts), UPDATE (example above) and SELECT (for building WHERE statement [AND logic]).

+

The $db->sql_build_array() function supports the following modes: INSERT (example above), INSERT_SELECT (building query for INSERT INTO table (...) SELECT value, column ... statements), UPDATE (example above) and SELECT (for building WHERE statement [AND logic]).

+ +

sql_multi_insert():

+ +

If you want to insert multiple statements at once, please use the separate sql_multi_insert() method. An example:

+ +
+$sql_ary = array();
+
+$sql_ary[] = array(
+	'somedata'		=> $my_string_1,
+	'otherdata'		=> $an_int_1,
+	'moredata'		=> $another_int_1,
+);
+
+$sql_ary[] = array(
+	'somedata'		=> $my_string_2,
+	'otherdata'		=> $an_int_2,
+	'moredata'		=> $another_int_2,
+);
+
+$db->sql_multi_insert(SOME_TABLE, $sql_ary);
+	

sql_in_set():

@@ -2201,6 +2223,13 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
+

Revision 8596+

+ + +

Revision 1.31