0
我對此代碼有問題。從php的數據庫中選擇1字段
我想從Users
表中選擇郎,如果是fa
將消息發送到用戶用電報機器人u能幫助我PLZ
// Create connection
$sconn = new mysqli($dbservername, $dbusername, $dbpassword, $dbname);
// Check connection
if ($sconn->connect_error) {
die("</br>Connection failed: " . $sconn->connect_error);
}
else{
echo "</br>Connected successfully</br></br></br>";
}
$sconn->query("set names utf8mb4");
$ssql = "SELECT lang FROM Users WHERE user_id=$user_id";
$result = $sconn->query($ssql);
if($ssql == "fa"){
var_dump(bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>"test",
]));
}
$sconn->close();
短的例子不應該,如果($ ssql ==實際上,如果($ result->郎== – jeff