Ordering of recordsets

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Re: Ordering of recordsets

    Create some links (or a drop-down <select> list) that the user can click on
    to select the way they want the collection ordered.

    Dynamically build the SQL statement (or use a bunch of Case statements) so
    that the correct ORDER BY clause is sent to the database.

    eg, your links could look like this:

    image.asp?order=ID
    image.asp?order=ImageDate
    image.asp?order=ImageName
    etc

    and you'd use the value in order= to determine what ORDER BY

    Cheers
    Ken


    "Sam Churchill" <ngs@samchurchill.co.uk> wrote in message
    news:zmV%a.8170$z7.916108@wards.force9.net...
    : Hi,
    :
    : I'm trying to find an easy way of making an online interface to change the
    : ordering that a recordset is displayed in.
    :
    : I have a picture gallery of events, each event with more than one picture.
    : I want the index page to show the events in the correct order according to
    a
    : field in the event table in the database. This is easy enough but I want
    : to build a web interface which allows the browser to change the ordering
    in
    : the database.
    :
    : I could build this from scratch but I figured that there may be something
    : out there which I could just plug in. Anyone come across anything?
    :
    : You can see an example of what I mean by the image gallery at
    : [url]http://www.summitnetwork.org.uk/public/gallery/index.asp[/url]
    :
    : Thanks,
    :
    : Sam
    :
    :


    Ken Schaefer Guest

  2. Similar Questions and Discussions

    1. Help Ordering Records
      I have a database with two fields: ID and SVCS. SVCS contains a comma delimited list. So records on the dabase might look like this: ID - SVCS 1...
    2. table ordering
      Hi, Hope someone may be able to help me. I have created a dropdown style menu in Fireworks, and a movie in Flash, and am putting it all together...
    3. Ordering by date ???
      I have created a DB in Access 2000. The Date Field (clientdate) is currently a MEMO field. The date is being entered as: 10 June 2004 21...
    4. Persisted XML Recordsets - Disconnected Recordsets - problems
      I have a recordset, client side .ASP that I save as a DOM. I pass to a server side .ASP to reconnect the recordset and update. I keep getting an...
    5. [PHP] File ordering
      > I am doing a 'readdir' on a subdirectory. I did my file naming counting on Just sort the $imgFiles array. -- Lowell Allen
  3. #2

    Default Re: Ordering of recordsets

    OK,

    If you can trust your administrators not to screw things up, then create a
    page that has a list of the Events, and a text box next to each one. Get the
    admins to type a number into the text box next to each event. Store these in
    the database.

    For code to update multiple records using a single page, try:
    [url]http://www.adopenstatic.com/resources/code/updatemultiplerecords.asp[/url]

    Cheers
    Ken

    "Sam Churchill" <ngs@samchurchill.co.uk> wrote in message
    news:BG50b.8314$z7.956130@wards.force9.net...
    : Sorry, that's not quite what I meant. Here is the table which would be in
    : the database:
    :
    : Order Event
    : 1 Glastonbury
    : 2 V2003
    : 3 Summer Camp
    :
    : which would (by the SQL statement "SELECT event FROM tblEvent ORDER BY
    : order") give the following on the public page:
    :
    : Glastonbury
    : V2003
    : Summer Camp
    :
    : I want to have a private page which will allow administrators to change
    the
    : order that they are displayed. i.e. change the order in the database so
    : that the table would look like:
    :
    : Order Event
    : 1 Glastonbury
    : 3 V2003
    : 2 Summer Camp
    :
    : and then the public page would look like:
    :
    : Glastonbury
    : Summer Camp
    : V2003
    :
    : Does this make more sense now?
    :
    : Sam


    Ken Schaefer Guest

  4. #3

    Default Re: Ordering of recordsets

    Hmm lazy...
    modifying is a must. depends how your database look like.
    It is like to buy a wheel thats fitt all cars..

    Paal


    "Sam Churchill" <ngs@samchurchill.co.uk> wrote in message
    news:Fzo0b.8658$z7.1053700@wards.force9.net...
    > I thought about this but I am more after a dummy-proof version. Something
    > like a page with each event listed and they can click on a "move up" or
    > "move down" link for each event (apart from the top and bottom ones which
    > would only have one option).
    >
    > I think I will carry on and code it myself, I was just wondering if
    someone
    > had the code already. If anyone wants a copy once I'm finished give me a
    > shout.
    >
    > Sam
    >
    > "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    > news:%235treKfZDHA.1832@TK2MSFTNGP09.phx.gbl...
    > > OK,
    > >
    > > If you can trust your administrators not to screw things up, then create
    a
    > > page that has a list of the Events, and a text box next to each one. Get
    > the
    > > admins to type a number into the text box next to each event. Store
    these
    > in
    > > the database.
    > >
    > > For code to update multiple records using a single page, try:
    > > [url]http://www.adopenstatic.com/resources/code/updatemultiplerecords.asp[/url]
    > >
    > > Cheers
    > > Ken
    > >
    > > "Sam Churchill" <ngs@samchurchill.co.uk> wrote in message
    > > news:BG50b.8314$z7.956130@wards.force9.net...
    > > : Sorry, that's not quite what I meant. Here is the table which would
    be
    > in
    > > : the database:
    > > :
    > > : Order Event
    > > : 1 Glastonbury
    > > : 2 V2003
    > > : 3 Summer Camp
    > > :
    > > : which would (by the SQL statement "SELECT event FROM tblEvent ORDER BY
    > > : order") give the following on the public page:
    > > :
    > > : Glastonbury
    > > : V2003
    > > : Summer Camp
    > > :
    > > : I want to have a private page which will allow administrators to
    change
    > > the
    > > : order that they are displayed. i.e. change the order in the database
    so
    > > : that the table would look like:
    > > :
    > > : Order Event
    > > : 1 Glastonbury
    > > : 3 V2003
    > > : 2 Summer Camp
    > > :
    > > : and then the public page would look like:
    > > :
    > > : Glastonbury
    > > : Summer Camp
    > > : V2003
    > > :
    > > : Does this make more sense now?
    > > :
    > > : Sam
    > >
    > >
    >
    >

    Paal Andersen Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139