这是我的表的代码:
<table border="black">
<tr><th>Date</th><th>Newsletter ID</th></tr>
<?php
while ($row = oci_fetch_array($stid)):
echo "<tr><td>" . htmlentities($row["DATE_ENG"]) . "</td>";
echo "<td>" . htmlentities($row["FEATURE_TITLE_ENG"]) . "</td>";
$NewsIDN = $row["NEWS_IDN"];
?>
<td>
<form name="editEmail" action="editEmail.php" method="GET">
<input type="hidden" name="EmailID" value="<?php echo $NewsIDN; ?>"/>
<input type="hidden" name="action" value="e">
<input type="submit" name="editEmail" value="Edit"/>
</form>
</td>
<td>
<form name="deleteEmail" action="deleteEmail.php" method="POST">
<input type="hidden" name="newsIDN" value="<?php echo $NewsIDN; ?>"/>
<input type="submit" name="deleteEmail" value="Delete" action="deleteEmail.php" onclick="return confirm('Are you sure want to delete')"/>
</form>
</td>
这是正在接收数据的查询。我如何使它在正确的日期之前从上到下订购表格,以便 2013 年 1 月在 2013 年 5 月之前?
public function get_Newsletters() {
$query = "SELECT NEWS_IDN,DATE_ENG,DATE_FRA,FEATURE_TITLE_ENG,FEATURE_TITLE_FRA,FEATURE_DESC_ENG,FEATURE_DESC_FRA,FEATURE_IMG_URL_ENG,FEATURE_IMG_URL_FRA,FEATURE_IMG_ALT_ENG,FEATURE_IMG_ALT_FRA,FEATURE_URL_ENG,FEATURE_URL_FRA,LAST_MODIFIED_BY,LAST_MODIFIED_DT,PUBLISHED_IND FROM BETS.TB__BETS_NEWSLETTERS ORDER BY DATE_ENG";
$stid = oci_parse($this->con, $query);
oci_execute($stid);
return $stid;
}
所以表正在调用上面的查询,现在我只是在做 ORBEDER BY DATE_ENG