-2
所以我嘗試顯示倒計時,其存儲與my_sql表事件......使用代碼IM是:如何從SQL數據庫中提取所有數據並用php顯示它?
<?php // Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$query = "SELECT * FROM `customcountdowns` WHERE `name_of_event` = * ORDER
BY name_of_event";
if($query) // will return true if succefull else it will return false
{ echo "query is working";
// code here
}
$result = mysqli_query($conn, $query);
if(!$result) {
echo 'No results found.';
}
它提出了查詢工作,並沒有發現結果...我怎麼才能所有的數據從表中顯示出來並顯示出來?提前致謝!
如果你想____所有的customcountdown記錄,然後放下WHERE子句 –
在查詢 –
似乎錯誤ok會做thx! –