Hi,
I have a page http://www.jlp.ie/future_events.php and when the page loads the information on the right-hand side is taken from the first entry in the database where I want it to be the last or latest entry in the database. Normally I know this is done by adding Order by ASC/DESC etc but as the information on the right is queried by the links on the left of the page by the following.
$query_GetNewsDetails = sprintf("SELECT * FROM future_events WHERE id = %s ", $colname_GetNewsDetails);
So my problem is that I can’t add WHERE id = %s ORDER by ASC as this obviously doesn’t work so can anyone advise me as to how I can get the page to initially load with the details on the right showing the most recent information that is added to the database.
Thank you very much
Brian
Rather than looping through a Record Set, perhaps you could just load all of the results into an array. Then you could display the list at the left by looping through the array, and display array[0] on the right.