Click to See Complete Forum and Search --> : link an array to a database table?


mtm81
11-07-2007, 08:51 AM
Hi,
I have an array made up from the filenames found in a folder on the server (suing filesystem object to gather the names in a loop)

For each of the items in the array, I need to check for a match in a table in my SQL database that runs the site.


This is just to check if the database has a record of that file or not..


I can think of a way of working whereby I loop each item in the array and check it individually against the database using a recordset or SP query.. however I suspect there is a much better method that I'm unaware of.

Anyone offer me some pointers?

edborva
11-13-2007, 05:43 PM
I like to keep the processing time on the client. So load the column fields you need to check into an array. Nest em and loop um.

Ed

blue-eye-labs
11-13-2007, 05:49 PM
I can't really think of a better way of doing it than looping, unless you can get the array to check against the mysql array that comes out of the query, but I doubt that'd work very well. What's wrong with looping it?