Search Values of Array in "One Go"
brahma at hindu.org
Wed Aug 23 15:07:10 EDT 2017
thanks…"use the dbase" good thought
The reason we use the array is once we load that into a local than I use the click line number of the song list (titles in a simple list field) to get the data for that particular song.
click on line 9
get use everything we need from sSelectionsA ["audiofiles"]["9"]
-- URL to the mp3 on the server to set for the player or for a download later
But you make a good case ifwe are going back to get a new list, onemight as well just use the query params and just utllize that original handler that queries the dBase for a playlist in the first place.
At least for theme and genre these are direct "hits" because there is an "equals" look up against these two enum values; but the searchString look up will still need to use %like% for "blues" is in "title, subtitle and description" . I have to check my sql query hand book aka "the internets" to see if there is an efficient way to write that query.
So then it comes down to whether doing a query semi-complex query that looks at 50,000 records and uses %like% against 3 columns is faster than iterating loops on a 1000 key array already in memory.
I can't wait to use the new tools for watching processes to see where bottle necks arise…
More information about the Use-livecode