我不明白为什么这不起作用。我知道这很简单。我希望将第二个查询中的值放入$newowner
我得到一个数组到字符串转换错误。
$query = "INSERT INTO owners (fname, lname) VALUES ('default', 'default')";
mysqli_query( $con, $query );
echo $query;
$query = "SELECT MAX(id) FROM owners";
$result = mysqli_query( $con, $query );
$newowner = mysqli_fetch_assoc( $result );
echo $newowner;