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

Confused with Loop
guys, i got confused with Looping...this is the case

I have 3 stocks, let say "Stock A&q

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

how to configure ADS in ABAP instance
Hi All,

I am working on r/3 4.7 ABAP system.Can we configure ADS(adobe document services)

Kill a process
I have a question - how can I kill a process from a command line or by using Oracle SQL Developer? I

Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

if else problem, help please
i have this script that i made only i try to also put in a if else for for some reason the script is

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

no idea what to do...
I'm fed up. I had issues with code that I have working on a different site that didn't work on my cu

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