Database query help

Posted in

#1 by sanmakko
2022-10-01 at 21:54
< report >Hello i wanted to search for vns with animated ero scenes and the tags i want but didnt find a way to do that on the search page. so i turned to the database, but my mysql skills arent good enough for me to figure this out.

i specifically would want it to give me a list of all vns with at least some animated ero scenes and the tag(s) i want so i would for example get all vns that have animated ero and the blowjob tag.

i figured out that i can get all vns with X tag with this
SELECT
*
FROM
tags_vn_inherit
WHERE
tag = 'g916'

and i could get vns with animated ero using this
SELECT
distinct vid
FROM
releases_vn rvn
join releases r on r.id = rvn.id
WHERE
ani_ero != 1
AND
ani_ero != 0

but im not sure how could i combine these to get what i want
#2 by Ileca
2022-10-01 at 22:07
< report >You made your life complicated as it is totally doable with the current interface: link.
#3 by sanmakko
2022-10-01 at 23:08
< report >oh.
well thanks :D
#4 by Yorhel
2022-10-02 at 13:08
< report >If you do want to combine queries later on, that's pretty easy to do with subqueries:

SELECT ..
FROM vn
WHERE id IN(SELECT vid FROM tags_vn_inherit ..)
AND id IN(SELECT distinct vid FROM ..)

Reply

You must be logged in to reply to this thread.