在悬停的heroku仪表板上,可以通过 # Name Type
1 search_idPrimary int(11)
2 activity varchar(255)
3 description varchar(5000)
4 activity_img varchar(255)
5 origin varchar(255)
6 to varchar(255)
7 date_from date
8 date_to date
<?php
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'website5.0');
//connecting to database and getting the connection object
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
//Checking if any error occured while connecting
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
die();
}
$stmt = $conn->prepare("SELECT activity, description, activity_img,
origin,
to, date_from, date_to FROM search;");
$stmt->execute();
$stmt->bind_result( $activity, $description, $activity_img, $origin, $to,
$date_from, $date_to);
$search = array();
while($stmt->fetch()){
$temp = array();
$temp ['activity'] = $activity;
$temp ['description'] = $description;
$temp ['activity_img'] = $activity_img;
$temp ['origin'] = $origin;
$temp ['to'] = $to;
$temp ['date_from'] = $date_from;
$temp ['date_to'] = $date_to;
$array_push ($search, $temp);
}
echo json_encode($search);
?>
按钮模拟问题警报,但是如何模拟清除警报?
这是仪表板的示例:
[