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

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

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

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

iMatch stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it ha

Custom Container in module pool program
Hello everyone,

I have created a custom control in my module pool screen. Now I want to s

date function help
i need help with date function

Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD H

i want run some web server under the ip sharer
hello i want run some web server under the ip sharer
my ip is floating ip but it doesnt matter

Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.

What the code

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

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