I have an array of tags inserted in my database, and I need to insert them in another table with itemID
and tagID
.
The thing is that i don't have the tagID
- instead I have a TagName
with the name. I need to get the tagID
so I can insert it afterward, but I'm wondering if this is possible to achieve in one single query.
I mean search for the name, then get its tagID
and then insert it the array, or even inserting them one by one would work.