searching data mysql via /r/learnprogramming


searching data mysql

I have a table that has 3 fields.

Auto increment; video_id ; tag_id.

So for example:

1,1,4 2,1,3 3,2,2 4,3,1 5,3,4 6,3,3 

If I wanted vids with tags 4 and 3 I'd have vid 1 and 3 returned. What would be the most efficient way of doing this ? IN() would work for OR but I want AND.

Submitted June 19, 2017 at 05:44AM by leaveatrace
via reddit http://ift.tt/2srfuAP

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s