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

form problem
Hi all, I think this is going to be easy to resolve but for I have been looking at it to long and I

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

does anyone know a php script to send mail using gmails/googles free smtp server
cause i heard u can do that but i dont know how

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with

FPDF Help
I've been playing with the FPDF module. I was building a form and rolling right along and then sudde

include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

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