我们可以将 mysqli 连接对象转换为字符串连接吗?
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
我们可以将 $mysqli 转换为程序查询吗?或者这是不可能的。
$query = "SELECT * FROM City ORDER by ID DESC ";
if ($result = mysqli_query($mysqli, $query)) {
/* fetch associative array */
while ($obj = mysqli_fetch_object($result)) {
printf ("%s (%s)\n", $obj->Name;
}