diff options
| author | Georg Richter <georg@php.net> | 2003-02-13 01:23:28 +0000 |
|---|---|---|
| committer | Georg Richter <georg@php.net> | 2003-02-13 01:23:28 +0000 |
| commit | 6bddc369660c9f39582c940e058daa9330ee1bea (patch) | |
| tree | 93c00f60b6bed3b4eb90c4f8583e39e74789ab68 /ext/mysqli/tests/043.phpt | |
| parent | b2b3596257eb2194fc6b91961602844da62bd5aa (diff) | |
| download | php-git-6bddc369660c9f39582c940e058daa9330ee1bea.tar.gz | |
new tests
Diffstat (limited to 'ext/mysqli/tests/043.phpt')
| -rw-r--r-- | ext/mysqli/tests/043.phpt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/mysqli/tests/043.phpt b/ext/mysqli/tests/043.phpt new file mode 100644 index 0000000000..9c02c32c1a --- /dev/null +++ b/ext/mysqli/tests/043.phpt @@ -0,0 +1,40 @@ +--TEST-- +mysqli_bind_param (UPDATE) +--FILE-- +<?php + include "connect.inc"; + + /*** test mysqli_connect 127.0.0.1 ***/ + $link = mysqli_connect("localhost", $user, $passwd); + + mysqli_select_db($link, "test"); + + mysqli_query($link,"DROP TABLE IF EXISTS test_update"); + mysqli_query($link,"CREATE TABLE test_update(a varchar(10), + b int)"); + + 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); + + $c1 = "Rasmus"; + $c2 = 1; + $c3 = 2; + + mysqli_execute($stmt); + mysqli_stmt_close($stmt); + + $result = mysqli_query($link, "SELECT concat(a, ' is No. ', b) FROM test_update"); + $test = mysqli_fetch_row($result); + mysqli_free_result($result); + + var_dump($test); + + mysqli_close($link); +?> +--EXPECT-- +array(1) { + [0]=> + string(15) "Rasmus is No. 1" +} |
