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

storing video files into mysql in php
hi

i have my video files in my folder ,
i have to store the path of the videos into db an

UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho

xml element exists
Code: [Select]<?xml version="1.0"?>
<Addresses>
<

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

Comparing Values
Hi
I'm reading data from a database and this seems to work OK.

Each system has an associat

How to add advertisment on top of videos
Hello,
I was told that i should find the answer for this problem in this forums.
I searched a

Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so

Quick Syntax Question
Hi folks,

I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b

PHP Tab Control
Hi All,

I would like to have PHP tab control with/without Javascript.

But I want to r

Bandwidth monitoring?
Hi guys,

I need a little information I have written a php app and I occurred to that I need

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