Display last record first.


Posted on 16th Feb 2014 07:03 pm by admin

I need some help how put the last record first and first record last.

Thanks

Did you know?Explore Trending and Topic pages for more stories like this.
Code: <?php
include("connect.php");

$query="SELECT * FROM MyNotes ";
$result=mysql_query($query);
$num = mysql_num_rows ($result);
mysql_close();

if ($num > 0 ) {
$i=0;
while ($i < $num) {
$username = mysql_result($result,$i,"username");
$notes = mysql_result($result,$i,"notes");
$id = mysql_result($result,$i,"id");

echo "<b>notes:</b> $notes
";
echo "<hr><BR>";

++$i; } } else { echo "The database is empty"; }?>
No comments posted yet

Your Answer:

Login to answer
210 Like 29 Dislike
Previous forums Next forums
Other forums

Automatically Detect Phone Model for WAP Jar Deployment
Making a wap site is fairly simple, but I'd like to know if there's a way to make it so that the wap

ASP.NET 2.0 - Enter Key - Default Submit Button
Hi,One of the most annoying things in developing web pages is handling the "Enter key" for form subm

SAP Business Suite
Hi all:

Within the SAP Business Suite solution I would like to ask you the main differenc

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

Security Exception on pages using AJAX
I am getting the exception: attempted to perform an operation not allowed by the security policy on

why is it over writing
Code: $filepaths[] = $_FILES['new_image'];
foreach ($filepaths as $filepath)
{
$imagename =

using explode() to fill in checkboxes
Hi

I have a field stored in a table that contains regions in the UK separated by commas. Ther

Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not

Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass

TimeZoneOffset
Hello,

Please i need your help. I have a system that users can use to punch in and out. This

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash