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

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

Question about ShowWindow()
Hello....

I'm struggling with sumpin, and I hope y'all can help.

I've got a CFormView

Share admin accross websites
I'm using .net memberships and roles in one of my sites, but I need to be able to share logins and p

[RESOLVED] Socket/Port remains open after app crashes
I'm having this problem with a networked app in vb.net.

If the program exits normally the por

Simple email form - Newbie
Hello all,

First time poster!

I've been asked to create a simple HTML form that submit

onclick problem
I have <input type="text" name="message">
<a href=page2.

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

Read from a text file after a specific word
Hi all.

I have a text file that looks like the one below.
I know how to open the text fi

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo

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