I have a code for a calendar and want to cutomise it to suit my needs. Only I can't seem to retrieve the data from the mysql database. It brings up nothing. I understand my knowledge of mysql is primitive so I might not be grasping the whole concept here.
Here is the area of code I want to change:
Code:
<TD><A HREF="#" TITLE="<? $i=0; while ($i < $num) { $thing=mysql_result($result,$i,"thing"); if ($i == '0') { echo ""; } else { echo " and "; } ?><?=$thing?>
<? ++$i;
}
?>
">
<? echo ""
.Date_Calc::daysToDate($month_cal[$row][$col],"%d")
."\n";
?>
</A></TD>
Where there is a link I'd like to change that to an image. The database holds the url So I was thinking it would be something like this:
Code:
<TD><img src="<? $i=0; while ($i < $num) { $done=mysql_result($result,$i,"done"); if ($i == '0') { echo ""; } else { echo " and "; } ?><?=$done?>
<? ++$i;
}
?>" TITLE="<? echo "<b>".Date_Calc::daysToDate($month_cal[$row][$col],"%d")."</b>\n";
?>">
</TD>
I need it to include only the first of the entries and ignore the others. How would I do that?
Your help is much apprecciated.