summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/072.phpt
blob: a1e9983bf337cd0172704032b7c4c63c2ac856e5 (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
31
32
--TEST--
mysqli warning_count, get_warnings
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
	require_once("connect.inc");

	$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);

	$mysql->query("DROP TABLE IF EXISTS not_exists");

	var_dump($mysql->warning_count);

	$w = $mysql->get_warnings();

	var_dump($w->errno);
	var_dump($w->message);
	var_dump($w->sqlstate);

	$mysql->close();
	echo "done!"
?>
--EXPECTF--
int(1)
int(1051)
%unicode|string%(%d) "Unknown table %snot_exists%s"
%unicode|string%(5) "HY000"
done!