19
19
mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 varchar(10), c2 text)");
21
21
$stmt = mysqli_prepare ($link, "INSERT INTO test_bind_fetch VALUES (?,?)");
22
mysqli_bind_param($stmt, "sb", $c1, $c2);
22
mysqli_stmt_bind_param($stmt, "sb", $c1, $c2);
24
24
$c1 = "Hello World";
26
mysqli_send_long_data($stmt, 1, "This is the first sentence.");
27
mysqli_send_long_data($stmt, 1, " And this is the second sentence.");
28
mysqli_send_long_data($stmt, 1, " And finally this is the last sentence.");
26
mysqli_stmt_send_long_data($stmt, 1, "This is the first sentence.");
27
mysqli_stmt_send_long_data($stmt, 1, " And this is the second sentence.");
28
mysqli_stmt_send_long_data($stmt, 1, " And finally this is the last sentence.");
30
mysqli_execute($stmt);
30
mysqli_stmt_execute($stmt);
31
31
mysqli_stmt_close($stmt);
33
33
$stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
34
mysqli_bind_result($stmt, $d1, $d2);
35
mysqli_execute($stmt);
34
mysqli_stmt_bind_result($stmt, $d1, $d2);
35
mysqli_stmt_execute($stmt);
36
mysqli_stmt_fetch($stmt);
38
38
$test = array($d1,$d2);