Birthday Table
smurfted
Member, PRO Posts: 581
So i was wondering if anyone has worked out the best way to store and look through a table for a specific date.
For a birthday list?
Comments
@smurfted
store the date as text, e.g. 19760421 (yyyymmdd)
Then use the very fast tableSearch function. It the returns the row the value was found in. If nothing was found then it stays 0.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Oh my goodness that function looks scary. I will have a bash and see if i can get it going...
Cheers @Hopscotch
(EDIT - Stupid browser kept trying to populate my post with Hopscotch's tag every time I pressed ENTER, argh... )
It's worth learning it though @smurfted- it's VERY fast/instant - the confusing stuff in there (for me initially) was understanding they just simply wanted "ROW" OR "COL" etc, and when I saw "[ROW|COL]" etc etc, I was wondering "WTH?!":- ie...
tableSearch(table,key,"[row|col]",targetRowCol,startRange,endRange,"(not)[exact|beginsWith|endsWith|contains]")
Here's a video tutorial!
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
That is epic, thank you boys. This forum is still top class.
Its only a basic start but its working.
http://arcade.gamesalad.com/games/139211
One question though, if two results come back true it just shows the first result, how can i get around that?
Use a loop, but let it jump from found to found row instead of touching each row.
If there are only 2 correct occurrences in a 1000 row table, the following loop will only cycle 3 times.
Very fast and finds every occurrence of what you are looking for.
Fast as in finding +-40 correct occurrences in a 1000 row table in ONE draw cycle. Woot GS!
Set the "max loops/frame" to about as many correct rows as you expect, but less than 40.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Excellent, but I'm gonna give it a try in the morning.
I know its been a while but wow, it works like a dream & its lighting fast...