show content based on date
Hey Ray
Using this recordset to display the news results from the db
<?php
$News = new WA_MySQLi_RS("News",$DBConnection,0);
$News->setQuery("SELECT * FROM news WHERE Live = 1 ORDER BY NewsDate DESC");
$News->execute();
?>
how would I modify it to only show results if the NewsDate column is either today or greater (ie result does not show if the NewsDate value has not yet been reached)?
Same question for the details page recordset
<?php
$News = new WA_MySQLi_RS("News",$DBConnection,1);
$News->setQuery("SELECT news.*, settings.CompanyName, settings.Town, settings.County, settings.PostCode FROM news, settings WHERE news.NewsID = ? OR news.Permalink = ? AND news.Live = 1");
$News->bindParam("i", "".(isset($_GET['id'])?$_GET['id']:"") ."", "-1"); //paramOffersID
$News->bindParam("s", "".(isset($_GET['perm'])?$_GET['perm']:"") ."", "-1"); //paramPermalink
$News->execute();
?>
Many thanks
Jamie