xref: /PHP-5.6/ext/mysqli/tests/030.phpt (revision eb0e09f5)
1--TEST--
2function test: mysqli_errno
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10	require_once("connect.inc");
11
12	/*** test mysqli_connect 127.0.0.1 ***/
13	$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
14	$errno = mysqli_errno($link);
15	var_dump($errno);
16
17	mysqli_select_db($link, $db);
18
19	mysqli_query($link, "SELECT * FROM non_exisiting_table");
20	$errno = mysqli_errno($link);
21
22	var_dump($errno);
23
24	mysqli_close($link);
25	print "done!";
26?>
27--EXPECT--
28int(0)
29int(1146)
30done!