-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! –