all groups > flash actionscript > december 2005 >
You're in the

flash actionscript

group:

searching through array? like statment?


searching through array? like statment? doof moof
12/31/2005 7:10:21 PM
flash actionscript:
i have a video play list on a mysql database which i can search with a
coldfusion component (CFC). this search is very nice and returns data that is
like the value that the user has input which is nice if the user dosn't know
exactly how to type what they want:

some code from the CFC:
SELECT artist, layout, sub_genre
FROM names
WHERE artist LIKE '%#name#%' AND location LIKE '%#location#%' AND genre =
'#genre#' AND sub_genre = '#subgenre#'

Note the LIKE statment used.

Nowthen, to minimize the impact on my coldfusion server from this application
I would like to set it up where by the playlist is also stored on the
client-side (as a local shared object in the form of various arrays) and gets
updated each time the app starts.
the app then uses this list of video data to create various playlists for
various things. VERY NICE!

HOWEVER. to take this to the next step i need to build a function which can
search an array in a similar way to that of how the earlier mentiond CFC can
search through the data base and gives a good healthy result for the value
entered. this is where i am stuck and need some outside thinking to help:)

any suggestions will be apprieciated.
Re: searching through array? like statment? kglad
1/1/2006 2:51:35 AM
Re: searching through array? like statment? doof moof
1/1/2006 6:21:02 PM
Thanks for the reply. I've read up a little now on indexOf() and it does seem
like this could form the basis of a solution so thanks for the idea.
One thing however is this still limits me to case sensetive searches of a
string(correct?). so is there anything i can do to make it non case sensetive
or some sort of work around that you can think of?
If you cant think of anything off the top of your head i will begin working on
the search function and once i have a general structure i will post it on this
page and perhaps an idea to fix this problem can come from there.
Thanks for your continued interest in this thread.
Re: searching through array? like statment? NSurveyor
1/1/2006 7:39:54 PM
Convert both strings to the same case (eg Lower Case or Upper Case...

Re: searching through array? like statment? doof moof
1/2/2006 1:11:40 AM
Re: searching through array? like statment? kglad
1/2/2006 1:32:44 AM
AddThis Social Bookmark Button