views:

38

answers:

0

I'll rephrase this. How do i execute a mysql query were i can pass an array in instead of write my own semi complex loop generating a very long sql query.

I'd like to select docs.id where the doc has each of the tags in a string list. Additional note is doc_tag has id, docid, tagid and tag_name has id, tagname.


This probably makes no sense but is there a turing complete sql lib? I would like to pass in a list and ask the engine to return results that has a match with EVERYTHING in this list of strings and i'll tell you what to join/compare the data.

I guess linq is the answer but i am working with plain old data (class Blah { ID id; string name; SomeClass class; //note this should be treated as a foreign key })

or maybe simple built in functions and or loops i can write in a SQL statement so i can pass the array as a parameter and write a condition inside the SQL statement (as oppose to library).

I have a feeling this will be downvoted. I am using MySql + C#