THANK you all for being so willing to help and offering your generous input for me on this topic!! i'm really excited about this-- it feels like one of those Golden Chalice moments-- like i'm ready to go up against a Boss in DOOM or something...hehe.. and i've got some bad-#ss weapons at my side. 😉
exciting! definitely the feeling/ moments that drive me at this new world (new to me) of programming.
bpat1434 wrote:Let me ask you this ... If all 3 queries share the same basic structure, and then each query has its own set of if()else{} statements to execute, then I'd say a class would make sense.
hi, bpat!
yes, i believe the answer is invariably "Yes" for all of the queries...
perhaps it will be best for me to just be more specific-- i wanted to avoid specifying exactly what i have here because i wanted to avoid being told "the answer"-- instead just the "classes syntax" and usage, so i can really dig in and learn while working on this-- (heck, i'm sure it's going to take a lot of cross referencing, regradless of what i'm told here), but that might just be making stuff too difficult for me to transmit to you what i've got going on here-- i think i'm just being silly...
so-- here's what i'm doing. this will appear on a web site where teachers, principals, school board, etc visit to search for artists to accomodate their needs.
this query will involve only one table, which has these fields:
art_id = primary
ensemble = enum
f_name = varchar
l_name = varchar
grade_levels = set('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15') // 0- 6 is Elementary, 7-9 is Middle School, 10-12 is HighSchool, and i planned for "special ed" and other unexpected stuff, hence up to 15
art_form = varchar
state_registered =enum
resident_artist = enum
comments = tinytext
these fields tell us if this is a person or an ensemble (if ensemble = '1', that name goes into l_name, if ensemble = '0' then f_name and l_name are used), what are their respective instructional grade-levels, what is their art-form (painting, theatre, photography, lit, music, etc), are they registered for state funding, and finally-- are they available for a "residency" (stay for several days/weeks) vs one day visit/ performance.
let me give some example queries-- as if i were a school-board member:
1) search terms: Middle School, Photography, State Funded
2) search: Sally Smith
3) sort-by-row: show all state_registered, sort alphabetically (alpha optional!)
see what i've got now? so, you can see the vast amount of if { } elseif {} statements, etc.
i realize that some of you have already shown me possible solutions in your own code-- but i wanted to be clear on what i'm working with here.
thanks again! i'm still working on another part of this project, but i want to dabble w/ this asap, so-- no rush on responding to this-- but of course i'm looking forward to reading it!
thanks so much!!!!!
🙂