Updating Rows

They have: 8 posts

Joined: Apr 2006

I have a problem updating the rows in my database.

Each time a regiteration form is filled, the latest users arrange below the previous user. I.E the id's are arranged in desecding order.

But the problem is that i want the latest user to show as ID 1 in my database. Can someone help?

------------------------------------------------------
Notin much' Just Me':cool:

popinsiteads's picture

He has: 51 posts

Joined: Sep 2005

You can't expect the table to count down because all the ids in every row would have to be changed.

using php:

<?php
$query
= mysql_query(\"SELECT MAX(ID) FROM users\");
?>

That should select the last ID from the table I think (change users to your table name)

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

ANytime I have a registration database, I always have a field for a timestamp that is set when the record is created. If you have that you can always sort by that as well.

-Greg

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.