Sorting Data

Results 1 to 2 of 2

Thread: Sorting Data

  1. #1
    Nathan Masek Guest

    Default Sorting Data

    I am having a heck of a time trying to sort my info. I can&#039t use the objrs.sort = "field_name ASC" method because I am using a Btreive provider. Does anyone know of another way I can sort my data .... or a way I can specify what KEY Btrieve will sort mby (because I want to sort by the last_name field and it is a key).<BR><BR>Any help would be greatly appreciated.<BR><BR>- Thanks<BR>- Nathan Masek

  2. #2
    Bharathi Guest

    Default RE: Sorting Data

    Are you displaying the data? Then You can write<BR>&#060;%<BR>function GetFlipOrd(prikey, lastprikey, tmpfield)<BR><BR>Dim flipord<BR> if cstr(prikey) = cstr(lastprikey) and (trim(lcase(prikey)) = tmpfield or cstr(lastprikey) = "") then<BR> if priord = "ASC" then<BR> flipord = "DESC"<BR> else<BR> flipord = "ASC"<BR> end if<BR> else <BR> if prikey = tmpfield then<BR> flipord = "DESC"<BR> else<BR> flipord = "ASC"<BR> end if<BR> end if<BR><BR> GetFlipOrd = flipord <BR>end function<BR><BR><BR><BR><BR><BR>flipord = GetFlipOrd(prikey, lastprikey, "last_name")<BR> Response.write "&#060;td width=""50"" class=""columnheader"" valign=""bottom""&#062;&#060;a title=""Sort by last name"" STYLE=""text-decoration:none; color:#000000;"" HREF=""javascript:document.sortitems.prikey.value= &#039last_name&#039;document.sortitems.priord.valu e=&#039" & flipord & "&#039;; rtitems.submit();""&#062;last_name&#060;/a&#062;&#060;/td&#062;"<BR><BR>%&#062;<BR><BR>

Posting Permissions

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