Update of /cvsroot/php-blog/serendipity/include/db
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23204
Modified Files:
mysql.inc.php mysqli.inc.php postgres.inc.php sqlite.inc.php
Log Message:
let's save some ressources. thanks to isotopp for the little zval tutorial, I hope this really does what I want it to do. ;)
Index: mysqli.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/db/mysqli.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mysqli.inc.php 19 Nov 2004 11:05:34 -0000 1.2
+++ mysqli.inc.php 26 Nov 2004 14:08:39 -0000 1.3
@@ -7,7 +7,7 @@
* array of field values if it returned a single row and $single is true
* array of array of field values if it returned row(s)
*/
-function serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr=false, $assocKey=false, $assocVal=false) {
+function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr=false, $assocKey=false, $assocVal=false) {
global $serendipity;
$type_map = array('assoc' => MYSQLI_ASSOC, 'num' => MYSQLI_NUM, 'both' => MYSQLI_BOTH);
Index: mysql.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/db/mysql.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mysql.inc.php 19 Nov 2004 11:05:34 -0000 1.2
+++ mysql.inc.php 26 Nov 2004 14:08:39 -0000 1.3
@@ -7,7 +7,7 @@
* array of field values if it returned a single row and $single is true
* array of array of field values if it returned row(s)
*/
-function serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr=false, $assocKey=false, $assocVal=false) {
+function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr=false, $assocKey=false, $assocVal=false) {
global $serendipity;
static $type_map = array(
'assoc' => MYSQL_ASSOC,
Index: postgres.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/db/postgres.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- postgres.inc.php 19 Nov 2004 11:05:34 -0000 1.2
+++ postgres.inc.php 26 Nov 2004 14:08:39 -0000 1.3
@@ -57,7 +57,7 @@
}
}
-function serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr=false, $assocKey=false, $assocVal=false) {
+function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr=false, $assocKey=false, $assocVal=false) {
global $serendipity;
static $type_map = array(
'assoc' => PGSQL_ASSOC,
Index: sqlite.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/db/sqlite.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sqlite.inc.php 19 Nov 2004 11:05:34 -0000 1.2
+++ sqlite.inc.php 26 Nov 2004 14:08:39 -0000 1.3
@@ -64,7 +64,7 @@
return $row;
}
-function serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr=true, $assocKey=false, $assocVal=false)
+function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr=true, $assocKey=false, $assocVal=false)
{
global $serendipity;
static $type_map = array(
|