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

How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p

Data storage spaces in varchar2
Trying to understand what's happening.
I am selecting a value from a table that is defined as c

php global variable
how can we create global variable so we can use its value in any form.. Please give example to

Error with login script
I am getting an error with my login script:

Error:
Code: Warning: Cannot modify header inf

Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website

Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

Refining of search Criteria
Dear Friends

I need a help, I have a search page which of cars related, which has different s

PHP / MySQL Associative Multidimensional Array:
Hello.

I have data in a MySQL Table that adheres to the below: (note, no index, could add if

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

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