Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to sort this out? Data sort order changes by client

Status
Not open for further replies.

Dostani

MIS
Jul 26, 2002
60
0
0
US
Greetings Forum Masters!!

I have a small problem I need to get some input on. I have a client that wishes to have the ability to ssort the shown thumbnails on the page to they're order on how they want them to be displayed.

First here is the thumbnail page


It is sorted by an auto number which I have added in the database a sort field in which it now may be used if applied. Currently I have set the record set to pull from a specific category and display the order from the autonumber generated field.

Now I know you can't hit the database to update "ALL" records at the same time it. So here is my delema. How do I make it so the client can modify the order of the records and also keep the client from duplicating the numbering order that is applied? Here is the admin page idea???


Any idea's comments or assistance would be greatly appreciated....

Dostani
 
you don't need to update all the records, just the ones in that category as I see it.

Add a display order field to the db that the admin can edit (client is taken as the browser in this context). It would not matter if these were duplicated or blank, the sort order of duplicates would be the table order for that category and blanks would be at one end (depending on ASC/DESC).

so the sql would be,
SELECT * FROM table WHERE cat = "category" ORDER BY display ASC



Chris.

Indifference will be the downfall of mankind, but who cares?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top