hi,
Simply put, I wish to display two records from a MySQL on a webpage.
I can simply display 1, no problem. The problem comes when displaying a second record.
say for example, I have a table of 30 records. From this table, I wish to display the first two records (ordered Descending) that are the result of a query.
Therefore, i might want it to display record 30 and 26.
The records are being displayed in two different layers on a web page, so I can't use a table.
the general layout can be gathered from here:
http://www.eightseven.net/phpbbindex.php
I have the following typical code, but need to display THIS record, and the PREVIOUS record........
mysql_select_db($database_db_con, $db_con);
$query_lastone = "SELECT * FROM news ORDER BY id DESC";
$lastone = mysql_query($query_lastone, $db_con) or die(mysql_error());
$totalRows_lastone = mysql_num_rows($lastone);
<?php echo $row_lastone['date']; ?>
how would it be best to access the previous record in the query?