Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

27
vendor/swoole/examples/php/mysql.php vendored Executable file
View File

@ -0,0 +1,27 @@
<?php
$db = new mysqli;
$db->connect('127.0.0.1', 'root', 'root', 'test');
$db->query("show databases", MYSQLI_ASYNC);
sleep(1);
if ($result = $db->reap_async_query())
{
print_r($result->fetch_row());
if(is_object($result))
{
mysqli_free_result($result);
}
}
else die(sprintf("MySQLi Error: %s", mysqli_error($link)));
$db->query("show tables", MYSQLI_ASYNC);
sleep(1);
if ($result = $db->reap_async_query())
{
print_r($result->fetch_row());
if(is_object($result))
{
mysqli_free_result($result);
}
}
else die(sprintf("MySQLi Error: %s", mysqli_error($link)));