2003-02-12 10:40:19 +00:00
|
|
|
--TEST--
|
|
|
|
function test: mysqli_warning_count()
|
2004-12-04 08:50:33 +00:00
|
|
|
--SKIPIF--
|
2009-07-06 14:39:10 +00:00
|
|
|
<?php
|
|
|
|
require_once('skipif.inc');
|
2007-10-10 10:08:29 +00:00
|
|
|
require_once('skipifconnectfailure.inc');
|
|
|
|
?>
|
2003-02-12 10:40:19 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
include "connect.inc";
|
2007-10-10 10:08:29 +00:00
|
|
|
|
2003-02-12 10:40:19 +00:00
|
|
|
/*** test mysqli_connect 127.0.0.1 ***/
|
2007-10-10 10:08:29 +00:00
|
|
|
$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
|
|
|
mysqli_select_db($link, $db);
|
2003-02-12 10:40:19 +00:00
|
|
|
|
2005-07-08 08:53:25 +00:00
|
|
|
mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
|
2003-02-12 10:40:19 +00:00
|
|
|
mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
|
|
|
|
|
2005-07-08 08:53:25 +00:00
|
|
|
var_dump(mysqli_warning_count($link));
|
2003-02-12 10:40:19 +00:00
|
|
|
|
|
|
|
mysqli_close($link);
|
2007-10-10 10:08:29 +00:00
|
|
|
print "done!";
|
2003-02-12 10:40:19 +00:00
|
|
|
?>
|
2009-07-06 14:39:10 +00:00
|
|
|
--CLEAN--
|
|
|
|
<?php
|
|
|
|
include "connect.inc";
|
|
|
|
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
|
|
|
|
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
|
|
|
|
|
|
|
|
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_warnings"))
|
|
|
|
printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
|
|
|
|
|
|
|
mysqli_close($link);
|
|
|
|
?>
|
2003-02-12 10:40:19 +00:00
|
|
|
--EXPECT--
|
|
|
|
int(1)
|
2007-10-10 10:08:29 +00:00
|
|
|
done!
|