$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);
'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);
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);
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);
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);
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);
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);
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);
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);
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);
'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);
$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);
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);
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);
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);
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";
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);
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';
$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);
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);
$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);
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);
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;
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);
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;
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);
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;
$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);
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";
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);
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;
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;
$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);
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;
$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();