|
OK. here's what I was able to scratch up.
<?
$username="usr_name";
$password="pword";
$database="d_base";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM table";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$date=mysql_result($result,$i,"date");
$shortinfo=mysql_result($result,$i,"shortinfo");
$maininfo=mysql_result($result,$i,"maininfo");
$link=mysql_result($result,$i,"link");
echo "<TD><TABLE border=1 bordercolor=FFFFFF cellpadding=0 cellspacing=0 width=100%><TR><TD class=greytitles width=33%>
<b>$date</TD></TR><TR><TD colspan=2 class=whitetitles>$shortinfo<br>$maininfo<br>$link </TR></TD></TABLE></TD>";
++$i;
}
?>
I just need this one to show the last three records. (ahh! @ News page!) The importing to the database is my real trouble at the moment. Any ideas Lippy?
__________________
------------------------------------------------------------
Please login or register to view this content. Registration is FREE - Black Prism professional web design services
------------------------------------------------------------
|