recordset default to last record
Hello, I have a recordset which defaults to record 1 on first page load. However, how can I edit the below recordset so that it defaults to the last record in the database (the idea is so that the page will display the very latest blog entry and elsewhere on the same page a blog navigation so that why this recordset has a GET['BlogID'].
$colname_rsBlog = "1";
if (isset($_GET['BlogID'])) {
$colname_rsBlog = $_GET['BlogID'];
}
mysql_select_db($database_harropsdb, $harropsdb);
$query_rsBlog = sprintf("SELECT * FROM blog WHERE BlogID = %s", GetSQLValueString($colname_rsBlog, "int"));
$rsBlog = mysql_query($query_rsBlog, $harropsdb) or die(mysql_error());
$row_rsBlog = mysql_fetch_assoc($rsBlog);
$totalRows_rsBlog = mysql_num_rows($rsBlog);
Chris