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

Module pool selction screen parameters combination logic
Hi floks,
Am new to the module pool development ,Recently i have created one program based on

PHP and Javascript
Hello Everyone,

I have a page that needs a javascript code to be written between PHP code but

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Word Trimming
Hi Guys & Gals!!

Hope you are all ok....

I need some help with the following

PHP Tab Control
Hi All,

I would like to have PHP tab control with/without Javascript.

But I want to r

If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and th

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

Changes to hosting company's server has affected web contact form
I started a thread a couple of months ago about the contact forms on my client's website. Basically

Need help to modify php ELSE code
I'm trying to find a way to have the php code display a message if there is no inventory listed in t

Mail sending is slow on server
Why mail is taking time to be send on apache-linux server

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