Veri tabanından veri alan ve görüntüleyen bir komut dosyası yazıyorum. 'a yalnızca her sayfada belirli bir tarihten, bir html giriş formu tarafından tanımlanan tarihin verilerini göstermeliyim. Kodlara bir bakın.Belirli bir tarihten itibaren mysqli tablo tablolarını al
}else{
//date selector - this chooses which date to display the data. The output of this needs to
be what date the data is sorted by.
$date = date('Y-m-d');
echo "
<input type='date' name='date' value='$date'>";
//include the database connection so you can fetch data from the table 'notices'
include("db.php");
//sql fetching data from the database ad displaying it
//Each row of data is currently sorted by the field id, which is currently auto-incrementing
$sql = "SELECT * FROM notices ORDER BY id DESC";
$stmt = $db->query($sql);
$stmt->execute();
$stmt->setFetchMode(PDO::FETCH_ASSOC);
if($stmt->rowCount() > 0){
while($row = $stmt->fetch()){
echo "
<p><b>".$row['subject']."</b></p>
<p>".$row['message']."</p>
<p>".$row['name']."<br></p>
<hr>
";
}
}
}
Herhangi bir yardım en çok takdir edilecektir. Teşekkürler.
kullanım tarihi parametresi görüntülemek için mysqli sorgusu kullanabilirsiniz nerede fıkra –
nedir şema? – symcbean