tj
04-25-07, 03:23 PM
Hi guys,
Was wondering if anyone could help me modify the following:
<?php
include("support/configuration.php");
include("support/includes/functions.php");
$link = mysql_connect($db_host,$db_username,$db_password);
mysql_select_db($db_name);
$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC";
$result=mysql_query($query);
while($data = mysql_fetch_array($result)) {
$id = $data["id"];
$date = $data["date"];
$title = $data["title"];
$announcement = $data["announcement"];
$date = fromMySQLDate($date);
echo("
<font color=#cccccc>$date</font> - $title
$announcement</p>");
}
?>
To only display the last 3 announcements published?
Thanks :)
Was wondering if anyone could help me modify the following:
<?php
include("support/configuration.php");
include("support/includes/functions.php");
$link = mysql_connect($db_host,$db_username,$db_password);
mysql_select_db($db_name);
$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC";
$result=mysql_query($query);
while($data = mysql_fetch_array($result)) {
$id = $data["id"];
$date = $data["date"];
$title = $data["title"];
$announcement = $data["announcement"];
$date = fromMySQLDate($date);
echo("
<font color=#cccccc>$date</font> - $title
$announcement</p>");
}
?>
To only display the last 3 announcements published?
Thanks :)