Hello All,
I am trying to retrieve information from MySQL, however I want to retrieve only the courses that are 45 days or more out from the current date.
The current startdate is displayed as such: 2002-02-21.
My statement reads:
include("common.php");
$db_name = "$db";
$table_name = "$table";
$datestamp = mktime (0,0,0,date("m") ,date("d")+45,date("Y"));
$connection = @mysql_connect("$server", "$user", "$password") or
die("Couldn't connect.");
$db = @mysql_select_db($db_name, $connection) or die("Couldn't select
database.");
$sql = "
select id, coursecode, coursename, startdate, starttime, stopdate
from $table_name
order by startdate
WHERE startdate >= $datestamp
";
I am still a novice at this, so any help will be appreciated.
Thanks
:o) Ivan