so, rather than this huge, disgusting, vomit-inducing mess of a function, you can have this!!!!!!!!
(note: the second code will not actually work 100% of the way, I haven't tested it, but I know for certain that, for example, "defect" should actually be "defects__name" but I literally JUST wrote that to show off this awesome feature, and in order for it to work exactly like it is I'm gonna need to edit the form that submits this stuff and blah blah blah)
now that I think about it, it would be a lot better to have several different possible filter parts....... like. rather than "by=date&for=10/12/2015" and "by=plant&for=A" I would just have "date=10/12/2015" or "plant=A"
that would not only look a lot cleaner in the URL but it would also allow multiple fields to be filtered by, like "date=10/12/2015&plant=A"............................. ..................
man. I put so much work into that terrible function and form only to leave it behind now. sigh
just in case anyone was wondering where this went
YEAH RIGHThttp://pastebin.com/EtMqXARzit looks so nice in comparison <3
plus it works. which is honestly just the bombest part
p.s. if you don't think these pastebin titles were funny then smd
in other news, I have a habit of looking at all the changes I've made, and deciding not to bother sticking them all in separate commits
...then I describe all the changes individually in the commit message anyway, completely defeating the purpose of skipping the separate commits thing
:(