您可以使用以下代码
mysqli
来代替:
...
$orig = $_REQUEST['orig'];
$dest = $_REQUEST['dest'];
$sql = "select * from transit where trans_orig = '$orig' and trans_dest = '$dest'";
$dbAuth = new mysqli("localhost", "databaseuser", "databasepassword", "databasename");
$result = mysqli_query($dbAuth, $sql);
$results = mysqli_fetch_all($result, MYSQLI_ASSOC);
if (count($results) == 0) {
die("No Results"); // Or handle the case yourself
}
$row = $results[0];
...