xref: /PHP-5.3/ext/mysqli/tests/072.phpt (revision 6c1f4e58)
1--TEST--
2mysqli warning_count, get_warnings
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10	require_once("connect.inc");
11
12	$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
13
14	$mysql->query("DROP TABLE IF EXISTS not_exists");
15
16	var_dump($mysql->warning_count);
17
18	$w = $mysql->get_warnings();
19
20	var_dump($w->errno);
21	var_dump($w->message);
22	var_dump($w->sqlstate);
23
24	$mysql->close();
25	echo "done!"
26?>
27--EXPECTF--
28int(1)
29int(1051)
30%unicode|string%(%d) "Unknown table %snot_exists%s"
31%unicode|string%(5) "HY000"
32done!