2003-02-12 00:46:29 +00:00
|
|
|
--TEST--
|
|
|
|
function test: mysqli_error
|
2004-12-04 08:50:33 +00:00
|
|
|
--SKIPIF--
|
2008-01-08 12:43:08 +00:00
|
|
|
<?php
|
|
|
|
require_once('skipif.inc');
|
2007-08-09 08:41:12 +00:00
|
|
|
require_once('skipifconnectfailure.inc');
|
|
|
|
?>
|
2003-02-12 00:46:29 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2004-12-04 08:16:04 +00:00
|
|
|
include "connect.inc";
|
2003-02-12 00:46:29 +00:00
|
|
|
|
|
|
|
/*** test mysqli_connect 127.0.0.1 ***/
|
2007-07-12 20:53:05 +00:00
|
|
|
$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
2003-02-12 00:46:29 +00:00
|
|
|
$error = mysqli_error($link);
|
|
|
|
var_dump($error);
|
|
|
|
|
2007-07-12 20:53:05 +00:00
|
|
|
mysqli_select_db($link, $db);
|
2003-02-12 00:46:29 +00:00
|
|
|
|
2008-01-08 12:43:08 +00:00
|
|
|
mysqli_query($link, "SELECT * FROM non_exisiting_table");
|
2007-07-12 20:53:05 +00:00
|
|
|
$error = mysqli_error($link);
|
2003-02-12 00:46:29 +00:00
|
|
|
|
|
|
|
var_dump($error);
|
|
|
|
|
|
|
|
mysqli_close($link);
|
2007-07-12 20:53:05 +00:00
|
|
|
print "done!";
|
2003-02-12 00:46:29 +00:00
|
|
|
?>
|
2006-09-26 13:06:13 +00:00
|
|
|
--EXPECTF--
|
2009-05-28 14:11:41 +00:00
|
|
|
%unicode|string%(0) ""
|
|
|
|
%unicode|string%(%d) "%s"
|
|
|
|
done!
|