close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Ordering records

Thread began 8/10/2010 8:48 pm by dan361748 | Last modified 8/11/2010 10:50 am by dan361748 | 606 views | 4 replies |

dan361748

Ordering records

Hi - wondering if anyone has tackled a 'nicer' way to order records in a list. I know I can create an order field, however it means editing each record to create the order.

Just curious to see if anyone has come up with a more elegant solution. I've seen AJAX tutorials on click/drag ordering items with save to mySQL, but though I'd check these forums first!

Many thanks

Sign in to reply to this post

CraigRBeta Tester

It depends what you mean by ORDER, do you mean order or RE-ORDER

If you just want to display the rows in a particular order, by orderid, by name or by date, then this is easily done by adding the ORDER BY clause into the SQL.

Once the page has been created and sent to the browser, the order is fixed, unless you use ajax.

Another approach is to use a spry dataset, (also uses ajax), which is well documented.

A further approach, (but it means refreshing the page), is to have the 'order by' determined by a form variable, and when the form is posted, use this variable in the SQL

Sign in to reply to this post

dan361748

Thanks for the reply Craig

Actually - I mean the user manipulating an order field in the table so they can change the display order of records returned.

In the past I have included in my forms an 'order' field where the user puts in a number. The records can then be sorted based on the numbers entered. Problem is a user doesn't want to have to go through each record to renumber if they add/delete something.

I've seen some CMS systems use a 'weight' value where items with less weight sink to the bottom and vice versa, but I think that is a little confusing.

I'm going to keep looking for some kind of way to implement this with ajax I guess.

Sign in to reply to this post

Jason ByrnesWebAssist

have you see this thread:
showthread.php?t=9353

is this what you are after?

Sign in to reply to this post

dan361748

Yes. Exactly. Thank you so much.

This is why these forums are invaluable.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...