PHP/Mysql not giving me results as desired

Hi

I have a wee issue that I cannot work out, and am sure it is something very small.

The following will not give me any results, although I am certain my Mysql database is in order, along with the script below. Any assistance would be greatly appreciated.

The task is for the desired row be shown once the date of another has expired, thus keeping my calendar list up to date.

Thanks a lot in advance.
[php]
$link = mysql_connect(‘www.EXAMPLE.com’, ‘USER’, ‘PASSWORD’);
if (!$link) {
die('Not connected : ’ . mysql_error());
}
$db_selected = mysql_select_db(‘EXAMPLE DB’, $link);
if (!$db_selected) {
die ('Failed to load data : ’ . mysql_error());
}
$result = mysql_query(“SELECT * FROM EXAMPLETABLE ORDER BY yy ASC, mm ASC, dd ASC LIMIT 4”);
while($row = mysql_fetch_array($result))
{

list($day, $month, $year) = explode(’-’, $row[‘end’]);
$timestamp= mktime(0, 0, 0, $month, $day, $year);

if($timestamp < mktime()){echo’’;} else{
echo’

'; }
;}

[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service