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

How to get all server headers like Live http Headers does
Hey all, like many of you I use the Firefox addon "Live http Headers". I'm trying to write

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.

When I send

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

PHP Programming error. Please help!
Hi there,

Am making a website for a friend and have encountered a problem that i need fixing

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

can i optmize image to 50% quality before uploading 2 server
Hi there

i have jus written a php program to upload and display images but when i try to uplo

Displaying data from MySql a different way
Hi all,
I'm pretty new to php and MySql and have hit a problem.

I am able to display data

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

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