| Current Path : /var/www/cesa.co.za/members/inc/ |
| Current File : /var/www/cesa.co.za/members/inc/press.inc |
<?php
// Database Connection String
$dbc = mysql_connect($server,$user,$pass);
mysql_select_db($db,$dbc);
if (!isset($type)) {
$type="";
}
// if ($pressrowlimit > 0) {
// $sql = "SELECT Id,Title,ReleaseDate FROM Press where Press.Archive = 'new' ORDER // BY ReleaseDate DESC";
// } else if ($pressrowlimit < 0) {
// $sql = "SELECT Id,Title,ReleaseDate FROM Press where (Press.Archive = 'new') AND // (TO_DAYS(NOW()) - TO_DAYS(ReleaseDate) <= 7) ORDER BY ReleaseDate DESC";
// } else {
// $sql = "SELECT Id,Title,ReleaseDate FROM Press where Archive = 'new' ORDER BY // ReleaseDate DESC";
// echo "the sql is:", $sql;
// }
$sql = "SELECT Id,Title,ReleaseDate FROM Press where Archive = 'new' ORDER BY ReleaseDate DESC";
// echo "the sql is:", $sql;
// Get Results and number of rows returned
$result = mysql_query($sql);
$result_rows = mysql_num_rows($result);
If ($result_rows > 0) {
?>
<table width="100%" cellpadding="1" border="0" cellspacing="0">
<?php
while($row = mysql_fetch_array($result)) {
$art_date = $row["ReleaseDate"];
echo "<tr><td valign=\"top\" class=\"tablerow\">".$art_date."</td><td valign=\"top\" class=\"tablerow\"><a href=\"/members/showpress.phtml?ids=".$row["Id"]."\">". $row["Title"]."</a></td></tr>\n";
}
?>
<tr><td width="70"><img src="/members/pics/spacer.gif" height="1" width="70" alt=""></td><td></td></tr>
</table>
<?php
} else {
echo "No News Articles Found.", $sql;
}
mysql_free_result($result);
?>