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

Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool

Thanks

"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql

Email to a friend script problems
I have this send-to-a-friend script with 2 issues:


1) When you open the form popup on a p

passing data from one page to another
hey guys
i have the follwoing code to get information from one page and place on another:

Help with PHP Email Script
Hi guys,

I'm a newbie to php and need help with the script below:

At the moment when I

cURL Upload Help
OK, I am creating a bridge from a local program to my website and I am trying to find the best way t

Text to picture Generator
Hello, i have found this script and it works really good^^ But i have one problem, i would like to c

PHP form authentication
Hi guys,

what am trying to achieve is this: Whenever a user tries to login to my website, an

Passing an array of values From VB6.0 to Oracle PL/SQL Function
Basically we are using VB6.0.

When we try to pass an array from VB6.0 to an Oracle PL/SQL

Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.

Code: $moderators = array('Admin', 'ba

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