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

Calling a Procedure with IN & OUT Parameters
Hello,

I usually call my procedures using the following way

declare variable e

gettext translates ALWAYS?
I'm using gettext with the new version of XAMPP (5.3.0) on Windows Seven RTM (build 7600)
gettext

php mysql query from input textbox
Hi,

I have a text box, in that i have given the mysql query. I can able to get the query in v

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

php not working written for consumption of slots
1. Here is the function where i will be allowed to consume the slot booked by me.

2. Here i c

Newb advice
Hi all,

I'm a flash front end designer and I've taken on a project that needs some back end p

Custom list order
Hi there,

I have checked this tutorial and it's great till the point where I want to display

Email/MMS to Site
Hey guys. I'm looking for a way for a user to upload images and/or text via their cell phones. It

strptime() equivalent for php4 ?!
Greetings!

this is my first post, thank you in advance for your replies.

Well, the ti

C++ Http request?
Code: string Response = "LOGIN_UNSUCCESSFUL"; System.Net.WebRequest request = Sy

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