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

PHP friend keyword equivalent
is there a PHP equivalent for the C++ friend keyword?

problem with script manager
Hi iam using Net.2005.I have created ajax enabledwebsite.i have master page in which i have script m

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

some questions
Hello,

I am looking for the answers for following questions:

1) Does PHP support overl

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

Warehouse Management
Hi,

On our system, we have two storage locations ( A and B ) where A is the main factory

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

Database connection failure
Hello All,

I am trying to create new connection to Oracle DB 10.1,
I could not see a

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