|
I was thinking the same thing.=Probably not a big help or what you want to hear =but I would consider reorganizing this data so that it is properly normaliz=ed.For example consider the following field struc=tureSKU, DOW, SH, EH100=0,6,3,5(Thats a day 6 block for 3 to 5pm) This way you have essentiality the same data and now you =can group your results VERY easily buy Day of the week, start times or endt=imes.While it feels like you have more data this =way, you actually have a ton less as in any standard DBS system you are blo=cking memory for fields without or without data. And in the way you=E2=80==99re dealing with now you not only are repeating verbose days over and ove=r (lots more text data), but also settings placeholder for ~40 fields simpl=y for 3 data elements.If you reall=y want to do this right I would make the DOW a r_DOW field where the number= relates to a related sku in a day table so that you can easily adjust spel=lings or dat abbreviations in Data and not in code.
On Oct 18, 2017, at 4:59 AM, Stuart Tremain <webdna@idfk.com.au> wrote:<=/div>------------------------------Hi StephenA little bit =vague on what you are trying to achieve but:You may= have to do 7 searches, and then sort the searches by hour for that day. Search for all records =3D Monday sorted by hours There could be easier ways to achieve this depending on ho=w you have set up your db. If you have 40 fields in your db, why not give t=hem a position number i.e. 01 - 40 and then just sort by position number ?<=br> On 16 Oct 2017, at 15:29, Steve @ T=ailored Web Solutions <steve@tailoredwebsolutions.=net > wrote:I have an html form with 40ish checkboxes for hourly time spans of= each day, which correspond to fields in the database.example: =C2=A0 ==C2=A0 =C2=A0FRIDAY_1_3FRIDAY_11_1FRIDA=Y_3_5FRIDAY_9_11MONDAY_1_3MONDAY_11_1MONDAY_3_5MONDAY_9_11=C2=A0=etc...The data in the fields=C2=A0looks like this: =C2=A0==C2=A0onon=on=onon <=br>The customer has asked me to sort the entire db by the= days of the week, then the hours of each day.So I thought that if I assigned a number value t=o each field: =C2=A03241=76<=span style=3D"font-size:x-small;white-space:pre-wrap">85t=hought then I might be able to sort by these numbers, but I didn't know= how.Thanks for asking,sfb<=br>
Ste=phen BraunOn Sun, Oct 15, 2017 at 10:58 PM, Brian Frie=s <iphonzie@gmail.com> wrote:------------------------------Database sorting is always on one =or more columns, and effects the order of the rows returned.=Perhaps you could give us an idea of the problem you are trying to sol=ve, and we could be of more help.- BrianOn Oct 15, 2017, at 7:50 PM, Steve @ Tailored Web Solutio=ns <=steve@tailoredwebsolutions.net > wrote:Yes, I can sort by one or more (vertical) (column) fieldsIs it possible to sort by (horizontal) rows?Thanks,sfb------------------------------
Stephen BraunTailored Web Solutions
steve@tailoredwebsolutions.net
www.tailoredwebsolutions.com315.343.1744<=/span>On Sun, Oct 15, 2017 at 7:12 PM, Kenneth Gro=me <ken@webdnasolutions.com> wrote:You can sort by one or more fields.
Regards,
Kenneth Grome
WebDNA Solutions
http://www.webdnasolutions.com
Web Database Systems and Linux Server Administration> =sbraun1@twcny.rr.com <mailto:sbraun1@twcny.rr.com>
On 10/15/2017 11:41 AM, Stephen Braun wrote:
> Good Day All,
>
> Is there a way to sort =C2=A0database results in a search command by r=ow?
>
> Thanksomuch,
> sfb
>
>
>
>
>
>
> Stephen F Braun
> --------------------------------------------------------- This
> message is sent to you because you are subscribed to the mailing
> list talk@webdna.u=s To unsubscribe, E-mail to:
> talk-leave@w=ebdna.us archives:
> http://www.webdna.us/page.dna?numero=3D55 Bug= Reporting:
> support@webdna.=us
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list talk@w=ebdna.us
To unsubscribe, E-mail to: talk-leave@webdna.us
archives: http://www.webdna.us/page.dna?numero=3D55
Bug Reporting: suppo=rt@webdna.us---------------------------This message is sent to you because you are subscribed tothe mailing list talk@w=ebdna.usTo unsubscribe, E-mail to: talk-leave@webdna.usarchives: http://www.webdna.us/page.dna? numero=3D55 Bug Reporting: suppo=rt@webdna.us---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list talk@w=ebdna.usTo unsubscribe, E-mail to: talk-leave@webdna.usarchives: http://www.webdna.us/page.dna? numero=3D55 Bug Reporting: suppo=rt@webdna.us---------------------------This message is sent to you because you are subscribed tothe mailing list talk@w=ebdna.usTo unsubscribe, E-mail to: talk-leave@webdna.usarchives: http://www.webdna.us/page.dna? numero=3D55 Bug Reporting: suppo=rt@webdna.us---------------------------This message is sent to you because you are subscribed tothe mailing list talk@w=ebdna.usTo unsubscribe, E-mail to: talk-leave@webdna.usarchives: http://www.webdna.us/page.dna? numero=3D55 Bug Reporting: suppo=rt@webdna.us
DOWNLOAD WEBDNA NOW!
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...