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

Is it possible to view php source code??
Hi All

I was just wondering if it's possible to view a websites php source code?
I know

Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <

GIS appliction help
I found some tutorials in the internet to develop a map application I don't want to use google maps

Bit manipulation program with binary operations
My homework is to create a program to scan in and add binary numbers and print them like so

MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

Any Good MMORPGs you've played?
I'm about to have ALOT of free time on my hands (finished highschool) and I need something to fill t

Custom list order
Hi there,

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

the problem with str_replace
$str="hahahahahahahahahahahahahaha";
$nn=1;
$str=str_replace('ha','MyGod',$str,$nn);

Trying to add functions to table
I have this list of characters and I'm trying to figure out what I have to do to put the results of

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