mirror of
https://github.com/php/php-src.git
synced 2025-01-21 11:13:38 +08:00
30 lines
587 B
PHP
30 lines
587 B
PHP
--TEST--
|
|
function test: mysqli_error
|
|
--SKIPIF--
|
|
<?php
|
|
require_once('skipif.inc');
|
|
require_once('skipifconnectfailure.inc');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
require_once("connect.inc");
|
|
|
|
/*** test mysqli_connect 127.0.0.1 ***/
|
|
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
|
$error = mysqli_error($link);
|
|
var_dump($error);
|
|
|
|
mysqli_select_db($link, $db);
|
|
|
|
mysqli_query($link, "SELECT * FROM non_exisiting_table");
|
|
$error = mysqli_error($link);
|
|
|
|
var_dump($error);
|
|
|
|
mysqli_close($link);
|
|
print "done!";
|
|
?>
|
|
--EXPECTF--
|
|
%unicode|string%(0) ""
|
|
%unicode|string%(%d) "%s"
|
|
done!
|