]> granicus.if.org Git - php/commitdiff
changed tests (ysqli_bind_param and mysql_bind_result changes)
authorGeorg Richter <georg@php.net>
Sat, 28 Jun 2003 21:30:58 +0000 (21:30 +0000)
committerGeorg Richter <georg@php.net>
Sat, 28 Jun 2003 21:30:58 +0000 (21:30 +0000)
28 files changed:
ext/mysqli/tests/002.phpt
ext/mysqli/tests/003.phpt
ext/mysqli/tests/004.phpt
ext/mysqli/tests/005.phpt
ext/mysqli/tests/006.phpt
ext/mysqli/tests/007.phpt
ext/mysqli/tests/008.phpt
ext/mysqli/tests/009.phpt
ext/mysqli/tests/010.phpt
ext/mysqli/tests/011.phpt
ext/mysqli/tests/012.phpt
ext/mysqli/tests/013.phpt
ext/mysqli/tests/016.phpt
ext/mysqli/tests/017.phpt
ext/mysqli/tests/018.phpt
ext/mysqli/tests/019.phpt
ext/mysqli/tests/020.phpt
ext/mysqli/tests/021.phpt
ext/mysqli/tests/022.phpt
ext/mysqli/tests/023.phpt
ext/mysqli/tests/024.phpt
ext/mysqli/tests/025.phpt
ext/mysqli/tests/026.phpt
ext/mysqli/tests/042.phpt
ext/mysqli/tests/043.phpt
ext/mysqli/tests/045.phpt
ext/mysqli/tests/046.phpt
ext/mysqli/tests/048.phpt

index bbf5808641b4494377a0c054555bf717fd9dd97a..7925f84fa8044f3635f94559394d95d1bdc466ee 100644 (file)
@@ -21,7 +21,7 @@ mysqli bind_result 1
        $rc = mysqli_query($link,"INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)");
 
        $stmt = mysqli_prepare($link, "SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11 from test_fetch_null");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7, &$c8, &$c9, &$c10, &$c11); 
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11); 
        mysqli_execute($stmt);
 
        mysqli_fetch($stmt);
index 6baae8a481cdbc0bf454f0dd53946a1642cc37f0..5535e9fb40c394747743ccd144e548aec2114e8b 100644 (file)
@@ -24,9 +24,9 @@ mysqli connect
                                                               '2010-07-10', 
                                                               '2020','1999-12-29')");
 
-       $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
 
-       mysqli_bind_result($stmt,&$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 1469bb566f7f0d5adb5f64785c164b6e8181e090..179c4b64cfd002434c854a0bbcc9b2acb8575bd5 100644 (file)
@@ -15,7 +15,7 @@ mysqli fetch char/text
        mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', 'this is a test')");
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2);
+       mysqli_bind_result($stmt, $c1, $c2);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 5688770fe029d336b66b47e73fc58d93a7bbce80..982a3950f29ace971dcf7c71a86d692e52500b5b 100644 (file)
@@ -17,7 +17,7 @@ mysqli fetch char/text long
        mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', '$a')");
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2);
+       mysqli_bind_result($stmt, $c1, $c2);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 059ce147a733d677e59022931318d7a5ad0fe978..d697e1e82f0ff3c18292bf5e0b13ac05aa57dbb7 100644 (file)
@@ -21,7 +21,7 @@ mysqli fetch long values
        mysqli_query($link, "INSERT INTO test_bind_fetch VALUES (-23,35999,NULL,-500,-9999999,-0,0)");
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 89d195975279acbbfc0e8c7d0a06d08938d03a12..2470c20e7e2686de0d942c48d7e604745346653f 100644 (file)
@@ -21,7 +21,7 @@ mysqli fetch short values
        mysqli_query($link, "INSERT INTO test_bind_fetch VALUES (-23,35999,NULL,-500,-9999999,+30,0)");
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 92498da44c2b8022a99ee54934ed4a68929672a1..c0ee735096159488a89f54ce54723a1bb23ae0ff 100644 (file)
@@ -20,10 +20,8 @@ mysqli fetch tinyint values
 
        mysqli_query($link, "INSERT INTO test_bind_fetch VALUES (-23,300,0,-100,-127,+30,0)");
 
-       $c1 = $c2 = $c3 = $c4 = $c5 = $c6 = $c7 = NULL;
-
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 942b443ebba0611dbb1896a0da3f8c3a4065d12e..042f837849864d0dc4e9ff39f561487ea1ef091f 100644 (file)
@@ -21,7 +21,7 @@ mysqli fetch bigint values
        mysqli_query($link, "INSERT INTO test_bind_fetch (c2,c3,c4,c5,c6,c7) VALUES (-23,4.0,33333333333333,0,-333333333333,99.9)");
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 60e660ad521b847b121c13e245f57e2af50b2cf9..4584e0a91f442ec1359a65438ee526890093ff9e 100644 (file)
@@ -26,7 +26,7 @@ precision=12
                                                                                        sin(0.6), 1.00000000000001, 888888888888888)");
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 1aca029294fe795bf71875302b57f1ee9ea21b3e..987ec1d14a6f18e156271d28b33a4d339e764624 100644 (file)
@@ -23,7 +23,7 @@ precision=12
                                                               2345.6,5678.89563,
                                                               'foobar','mysql rulez')");
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7, &$c8);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 019997064a5e91392b27876ee74cf492f0f43ffc..9af509fefdb0d98d825387702cd8ba9df591927f 100644 (file)
@@ -24,7 +24,7 @@ precision=12
                                                               '206','6.7')");
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7, &$c8);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index dafc9bba9b96b97f85a3161108938b1b9220146e..b09541919969285a6e34df0d6621b556cd8edfdf 100644 (file)
@@ -23,7 +23,7 @@ mysqli fetch mixed / mysql_query
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
 
        $c = array(0,0,0,0,0,0,0,0);
-       mysqli_bind_result($stmt, &$c[0], &$c[1], &$c[2], &$c[3], &$c[4], &$c[5], &$c[6], &$c[7]);
+       mysqli_bind_result($stmt, $c[0], $c[1], $c[2], $c[3], $c[4], $c[5], $c[6], $c[7]);
        mysqli_execute($stmt);
        mysqli_fetch($stmt); 
        mysqli_fetch($stmt);  
index 7d84c296552e56eb797f97d21bc63c90206b6546..4d16356a78e726320ac0c951ce28d05eb8c7ad07 100644 (file)
@@ -12,7 +12,7 @@ mysqli fetch user variable
        mysqli_query($link, "SET @dummy='foobar'");
 
        $stmt = mysqli_prepare($link, "SELECT @dummy");
-       mysqli_bind_result($stmt, &$dummy);
+       mysqli_bind_result($stmt, $dummy);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index e7aaf746cf91cbf3011654c6ca2a112217411f80..3b29828d38fce13b1dcc9f83c33fde0340e9f551 100644 (file)
@@ -10,7 +10,7 @@ mysqli fetch functions
        mysqli_select_db($link, "test");
 
        $stmt = mysqli_prepare($link, "SELECT current_user(), database()");
-       mysqli_bind_result($stmt, &$c0, &$c1); 
+       mysqli_bind_result($stmt, $c0, $c1); 
        mysqli_execute($stmt);
 
        mysqli_fetch($stmt);
index 8fb0d44dc509cf37374d746e13084af2530881f7..a0a247611dcba4158b281553954c5a5de4998bd1 100644 (file)
@@ -12,7 +12,7 @@ mysqli fetch system variables
        mysqli_query($link, "SET AUTOCOMMIT=0");
 
        $stmt = mysqli_prepare($link, "SELECT @@autocommit");
-       mysqli_bind_result($stmt, &$c0); 
+       mysqli_bind_result($stmt, $c0); 
        mysqli_execute($stmt);
 
        mysqli_fetch($stmt);
index 0e13f7520a1327ca2df352aae1d2001c3d3a8854..3983a941418bbed53f553820bd950495c171c3c5 100644 (file)
@@ -19,7 +19,7 @@ mysqli fetch (bind_param + bind_result)
                                                        col11 char(20))");
   
        $stmt=  mysqli_prepare($link,"INSERT INTO insert_read(col1,col10, col11) VALUES(?,?,?)");
-       mysqli_bind_param($stmt, &$c1, MYSQLI_BIND_INT, &$c2, MYSQLI_BIND_STRING, &$c3, MYSQLI_BIND_STRING);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_INT, MYSQLI_BIND_STRING, MYSQLI_BIND_STRING), $c1, $c2, $c3);
 
        $c1 = 1;
        $c2 = "foo";
@@ -29,7 +29,7 @@ mysqli fetch (bind_param + bind_result)
        mysqli_stmt_close($stmt);
 
        $stmt = mysqli_prepare($link, "SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11 from insert_read");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7, &$c8, &$c9, &$c10, &$c11); 
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11); 
        mysqli_execute($stmt);
 
        mysqli_fetch($stmt);
index 53827d0be39415d9a8477ff925565f0b17560232..1f98e553d6c57c74ae2a4348ebde1400a62ddc60 100644 (file)
@@ -18,13 +18,9 @@ mysqli bind_param/bind_result date
                                                         c7 timestamp(6))");
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_result VALUES (?,?,?,?,?,?,?)");
-       mysqli_bind_param($stmt, &$d1, MYSQLI_BIND_STRING,
-                                &$d2, MYSQLI_BIND_STRING,
-                                &$d3, MYSQLI_BIND_STRING,
-                                &$d4, MYSQLI_BIND_STRING,
-                                &$d5, MYSQLI_BIND_STRING,
-                                &$d6, MYSQLI_BIND_STRING,
-                                &$d7, MYSQLI_BIND_STRING);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_STRING, MYSQLI_BIND_STRING, MYSQLI_BIND_STRING, MYSQLI_BIND_STRING,
+                                MYSQLI_BIND_STRING, MYSQLI_BIND_STRING, MYSQLI_BIND_STRING),
+                                $d1, $d2, $d3, $d4, $d5, $d6, $d7);
 
        $d1 = '2002-01-02';
        $d2 = '12:49:00';
@@ -39,7 +35,7 @@ mysqli bind_param/bind_result date
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
 
-       mysqli_bind_result($stmt,&$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt,$c1, $c2, $c3, $c4, $c5, $c6, $c7);
        
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
index deabef6933ef8f6ff1d82a1d47e9fc7649f54e43..505dbdb672e45252ed8105d35cfecd1edd7bd430 100644 (file)
@@ -13,14 +13,14 @@ mysqli bind_param+bind_result char/text
        mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text)");
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?)");
-       mysqli_bind_param($stmt, &$q1, MYSQLI_BIND_STRING, &$q2, MYSQLI_BIND_STRING);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_STRING, MYSQLI_BIND_STRING), $q1, $q2);
        $q1 = "1234567890";
        $q2 = "this is a test";
        mysqli_execute($stmt);
        mysqli_stmt_close($stmt);
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2);
+       mysqli_bind_result($stmt, $c1, $c2);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index efd2fef8bda2cdb87e5972ee9466cc41a61e45f3..cd0945e81b20b89051014bdf6043400fce474b5e 100644 (file)
@@ -14,7 +14,7 @@ mysqli bind_param/bind_result char/text long
 
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?)");
-       mysqli_bind_param($stmt, &$a1, MYSQLI_BIND_STRING, &$a2, MYSQLI_BIND_STRING);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_STRING, MYSQLI_BIND_STRING), $a1, $a2);
 
        $a1 = "1234567890";
        $a2 = str_repeat("A1", 32000);
@@ -23,7 +23,7 @@ mysqli bind_param/bind_result char/text long
        mysqli_stmt_close($stmt);
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2);
+       mysqli_bind_result($stmt, $c1, $c2);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index fcbd4b2cfc8169a60e04fe5da6fe57b30191cafd..bb91298341e74b2181d776cc0be6decefeb7e133 100644 (file)
@@ -19,9 +19,10 @@ mysqli bind_param/bind_prepare fetch long values
                                                      c7 int)");
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
-       mysqli_bind_param($stmt, &$c1,MYSQLI_BIND_INT,&$c2,MYSQLI_BIND_INT,&$c3,MYSQLI_BIND_INT,
-                                &$c4,MYSQLI_BIND_INT,&$c5,MYSQLI_BIND_INT,&$c6,MYSQLI_BIND_INT,
-                                &$c7, MYSQLI_BIND_INT);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_INT,MYSQLI_BIND_INT,MYSQLI_BIND_INT,
+                                      MYSQLI_BIND_INT,MYSQLI_BIND_INT,MYSQLI_BIND_INT,
+                                      MYSQLI_BIND_INT),
+                               $c1,$c2,$c3,$c4,$c5,$c6,$c7);
        $c1 = -23;
        $c2 = 35999;
        $c3 = NULL;
@@ -34,7 +35,7 @@ mysqli bind_param/bind_prepare fetch long values
        mysqli_stmt_close($stmt);
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index e31064a02a330db3614fd5b9afd31545bcbec0f5..977a5c7954de9d42f3aa9072590c9a4475dd019a 100644 (file)
@@ -19,9 +19,10 @@ mysqli bind_param/bind_result short values
                                                      c7 smallint)");
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
-       mysqli_bind_param($stmt, &$c1,MYSQLI_BIND_INT,&$c2,MYSQLI_BIND_INT,&$c3,MYSQLI_BIND_INT,
-                                &$c4,MYSQLI_BIND_INT,&$c5,MYSQLI_BIND_INT,&$c6,MYSQLI_BIND_INT,
-                                &$c7, MYSQLI_BIND_INT);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_INT,MYSQLI_BIND_INT,MYSQLI_BIND_INT,
+                                      MYSQLI_BIND_INT,MYSQLI_BIND_INT,MYSQLI_BIND_INT,
+                                      MYSQLI_BIND_INT),
+                               $c1,$c2,$c3,$c4,$c5,$c6,$c7);
 
        $c1 = -23;
        $c2 = 35999;
@@ -35,7 +36,7 @@ mysqli bind_param/bind_result short values
        mysqli_stmt_close($stmt);
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index f32ef143f2dd5e20c13fe433f6e0e13a98924937..d3eb7963695eec0b4e5748257cc88862f2cb52cf 100644 (file)
@@ -19,8 +19,10 @@ mysqli bind_param/bind_result tinyint values
                                                      c7 tinyint)");
 
        $stmt = mysqli_prepare ($link, "INSERT INTO test_bind_fetch VALUES(?,?,?,?,?,?,?)");
-       mysqli_bind_param($stmt,&$c1, MYSQLI_BIND_INT,&$c2, MYSQLI_BIND_INT,&$c3, MYSQLI_BIND_INT,&$c4, MYSQLI_BIND_INT,
-                               &$c5, MYSQLI_BIND_INT,&$c6, MYSQLI_BIND_INT,&$c7, MYSQLI_BIND_INT);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_INT,MYSQLI_BIND_INT,MYSQLI_BIND_INT,
+                                      MYSQLI_BIND_INT,MYSQLI_BIND_INT,MYSQLI_BIND_INT,
+                                      MYSQLI_BIND_INT),
+                               $c1,$c2,$c3,$c4,$c5,$c6,$c7);
 
        $c1 = -23;
        $c2 = 300;
@@ -38,7 +40,7 @@ mysqli bind_param/bind_result tinyint values
        $c1 = $c2 = $c3 = $c4 = $c5 = $c6 = $c7 = NULL;
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index ef1b66862d58249fc662297c6a26118dae055f45..dbea1976cd33cfea2ba0c176fbf872a641f97eef 100644 (file)
@@ -15,7 +15,7 @@ mysqli bind_param/bind_result with send_long_data
        mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 varchar(10), c2 text)");
 
        $stmt = mysqli_prepare ($link, "INSERT INTO test_bind_fetch VALUES (?,?)");
-       mysqli_bind_param($stmt,&$c1, MYSQLI_BIND_STRING, &$c2, MYSQLI_BIND_SEND_DATA);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_STRING, MYSQLI_BIND_SEND_DATA), $c1, $c2);
 
        $c1 = "Hello World";
 
@@ -27,7 +27,7 @@ mysqli bind_param/bind_result with send_long_data
        mysqli_stmt_close($stmt);
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, &$d1, &$d2);
+       mysqli_bind_result($stmt, $d1, $d2);
        mysqli_execute($stmt);
        mysqli_fetch($stmt);
 
index 58580c631a07b5444b95303060b15121323b18db..4b559cdd99c4aaeb4fcb141ebc87546d0ddb10d8 100644 (file)
@@ -19,9 +19,10 @@ mysqli_fetch_object
                                                      c7 smallint)");
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
-       mysqli_bind_param($stmt, &$c1,MYSQLI_BIND_INT,&$c2,MYSQLI_BIND_INT,&$c3,MYSQLI_BIND_INT,
-                                &$c4,MYSQLI_BIND_INT,&$c5,MYSQLI_BIND_INT,&$c6,MYSQLI_BIND_INT,
-                                &$c7, MYSQLI_BIND_INT);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_INT,MYSQLI_BIND_INT,MYSQLI_BIND_INT,
+                                      MYSQLI_BIND_INT,MYSQLI_BIND_INT,MYSQLI_BIND_INT,
+                                      MYSQLI_BIND_INT),
+                               $c1,$c2,$c3,$c4,$c5,$c6,$c7);
 
        $c1 = -23;
        $c2 = 35999;
index 9c02c32c1af3bc2580462009a12b1fb6d37575d5..2065a7150ec06869129008436584c401f288fa69 100644 (file)
@@ -16,7 +16,7 @@ mysqli_bind_param (UPDATE)
        mysqli_query($link, "INSERT INTO test_update VALUES ('foo', 2)");
 
        $stmt = mysqli_prepare($link, "UPDATE test_update SET a=?,b=? WHERE b=?");
-       mysqli_bind_param($stmt, &$c1,MYSQLI_BIND_STRING,&$c2,MYSQLI_BIND_INT, &$c3, MYSQLI_BIND_INT);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_STRING,MYSQLI_BIND_INT, MYSQLI_BIND_INT), $c1, $c2, $c3);
 
        $c1 = "Rasmus";
        $c2 = 1;
index 5ca0f2ae02fa19b1eda17dc03a1eda7587621c52..ab98535d541ae0fa36054c748acc843fd294cd49 100644 (file)
@@ -10,7 +10,7 @@ mysqli_bind_result (SHOW)
        $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
 
        mysqli_execute($stmt);
-       mysqli_bind_result($stmt, &$c1, &$c2);  
+       mysqli_bind_result($stmt, $c1, $c2);    
        mysqli_fetch($stmt);
        mysqli_stmt_close($stmt);       
        $test = array ($c1,$c2);
index d4a93ca277a57244a1d17bfa7863912f19d6927c..323ee8484220fe0b721ec6025747263a41c8fee9 100644 (file)
@@ -15,7 +15,7 @@ mysqli_stmt_affected_rows (delete)
        mysqli_query($link, "INSERT INTO test_affected VALUES (1),(2),(3),(4),(5)");
 
        $stmt = mysqli_prepare($link, "DELETE FROM test_affected WHERE foo=?");
-       mysqli_bind_param($stmt, &$c1, MYSQLI_BIND_INT);
+       mysqli_bind_param($stmt, array(MYSQLI_BIND_INT), $c1);
 
        $c1 = 2;
 
index d8baf2041c5160dcda7ee89e5e3a5357f24bc219..102bcdfc26a59ba57ff8e7fa4ef87a5c39d55795 100644 (file)
@@ -21,7 +21,7 @@ mysqli bind_result (OO-Style)
        $mysql->query("INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)");
 
        $stmt = $mysql->prepare("SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11 from test_fetch_null");
-       $stmt->bind_result(&$c1, &$c2, &$c3, &$c4, &$c5, &$c6, &$c7, &$c8, &$c9, &$c10, &$c11); 
+       $stmt->bind_result($c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11); 
        $stmt->execute();
 
        $stmt->fetch();