Hello
I'm creating a tag database for my website in ASP.NET. In my system users can submit their articles and those articles can have tags associated with them. I searched the internet and found the toxi solution a good way to suit my needs. This schema has 3 tables:
Table_Articles: id, name, description
Table_TagMap: id, article_id, tag_id
Table_Tag: tag_id, name
I created the database and tables but I'm having troubles creating the insert command in asp.net. I think I have to use the following process to add the tags?
1. sort submitted tags into array
2. for every tag in the array:
1. get tag_id from tags where name matches the current tag
2. if that returns 0 rows:
1. add tag to tags table
2. get the tag_id
3. add article_id and tag_id to tagmap
3. finish (give user the a-okay, etc)
could you help me write the insert query in asp.net?
Thanks in advance!