summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/031.phpt
blob: 8518b45a3ebae0e0971dccaef7750789bc060acb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--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--
string(0) ""
string(%d) "%s"
done!