From: Georg Richter Date: Fri, 24 Mar 2006 10:58:52 +0000 (+0000) Subject: fixed minor problems (thx to tony) X-Git-Tag: php-5.1.3RC2~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8183e2e976fcd8f13f285712ec08b99caf25f32;p=php fixed minor problems (thx to tony) --- diff --git a/ext/mysqli/tests/017.phpt b/ext/mysqli/tests/017.phpt index 54d11ef719..866a118a86 100644 --- a/ext/mysqli/tests/017.phpt +++ b/ext/mysqli/tests/017.phpt @@ -12,15 +12,13 @@ mysqli fetch functions mysqli_select_db($link, "test"); - $stmt = mysqli_prepare($link, "SELECT current_user(), database(), 'foo'"); + $stmt = mysqli_prepare($link, "SELECT md5('bar'), database(), 'foo'"); mysqli_bind_result($stmt, $c0, $c1, $c2); mysqli_execute($stmt); mysqli_fetch($stmt); mysqli_stmt_close($stmt); - $c0 = ($c0 == $user . "@" . $host) ? 1 : 0; - $test = array($c0, $c1, $c2); var_dump($test); @@ -29,7 +27,7 @@ mysqli fetch functions --EXPECT-- array(3) { [0]=> - int(1) + string(32) "37b51d194a7513e45b56f6524f2d51f2" [1]=> string(4) "test" [2]=> diff --git a/ext/mysqli/tests/049.phpt b/ext/mysqli/tests/049.phpt index 8d16c3d4c7..4bb5bfef45 100644 --- a/ext/mysqli/tests/049.phpt +++ b/ext/mysqli/tests/049.phpt @@ -11,14 +11,16 @@ mysql_fetch_row (OO-Style) $mysql = mysqli_connect($host, $user, $passwd); $mysql->select_db("test"); - $result = $mysql->query("SELECT CURRENT_USER()"); + $result = $mysql->query("SELECT DATABASE()"); $row = $result->fetch_row(); $result->close(); - $ok = ($row[0] == $user . "@" . $host); - var_dump($ok); + var_dump($row); $mysql->close(); ?> --EXPECT-- -bool(true) +array(1) { + [0]=> + string(4) "test" +} diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt index a949b52c64..0b8a799a84 100644 --- a/ext/mysqli/tests/bug34810.phpt +++ b/ext/mysqli/tests/bug34810.phpt @@ -9,10 +9,10 @@ class DbConnection { public function connect() { include "connect.inc"; - $link = mysqli::connect($host, $user, $passwd); + $link = mysqli_connect($host, $user, $passwd); var_dump($link); - $link = mysqli::init(); + $link = mysqli_init(); var_dump($link); $mysql = new mysqli($host, $user, $passwd, "test");