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

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.

b+ tree
Hi
can every body help me about b+ tree ?(insert & delete)

How to make a mail Form secure?
I want to create an email Form on my web site. How can I make the Form secure so the submitted info

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

Socket problem
Hello,

Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.

PHP and Javascript
Hi Guys,

Im trying to load the contents of an html file into a text area for editing, this is

I face problems to extract data from one table and insert it in another one
Hi,

For modifications, I have to extract data from one table and insert it in another one

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

Force download script not handling files with spaces properly
I have a regular old php force download script, uses this code:

Code: header("Cache-Cont

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