任何人都知道如何获得TID
。我只需要TID
并将其设置为变量$TID
$sql = 'SELECT TID FROM walkin ORDER BY TID DESC LIMIT 1';
$result = mysqli_query($conn, $sql);
if ($conn->error) {
die("Query failed: " . $conn->error);
}
$TID = /answer here/
答案 0 :(得分:0)
使用bind_result
和fetch
来电的预备声明怎么样?
if($stmt=$conn->prepare("SELECT TID FROM walkin ORDER BY TID DESC LIMIT 1")){
if($stmt->execute() && $stmt->bind_result($TID) && $stmt->fetch()){
echo $TID;
}
}