RE: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-18 Thread hsv
2013/06/13 23:08 +, Rick James FIND_IN_SET might work the cleanest... WHERE FIND_IN_SET('action', genres) OR/AND [NOT] ... And have genres look like 'action,drama,foobar', that is comma-separators, and no need for leading/trailing comma. That would also work for genres = '1,3,10,19,

Re: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-13 Thread hsv
2013/06/11 12:59 -0700, Daevid Vincent Also, just for S&G this is how we are currently implementing it, but we feel the REGEXP is killing our queries and while "clever" is a bit hacky and nullifies any indexes we have on the genres column as it requires a file_sort table scan to compare s

Re: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-12 Thread hsv
2013/06/11 12:59 -0700, Daevid Vincent Also, just for S&G this is how we are currently implementing it, but we feel the REGEXP is killing our queries and while "clever" is a bit hacky and nullifies any indexes we have on the genres column as it requires a file_sort table scan to compare s

RE: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-12 Thread Paul Halliday
Daevid Vincent [mailto:dae...@daevid.com] > Sent: Wednesday, June 12, 2013 11:26 AM > To: mysql@lists.mysql.com > Subject: RE: How do I select all rows of table that have some rows in > another table (AND, not OR) > > This idea is so fancy pants and clever I *wish* it could have worke

RE: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-12 Thread Rick James
ent: Wednesday, June 12, 2013 11:26 AM > To: mysql@lists.mysql.com > Subject: RE: How do I select all rows of table that have some rows in > another table (AND, not OR) > > This idea is so fancy pants and clever I *wish* it could have worked for > me. > I checked and we actual

RE: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-12 Thread Daevid Vincent
m referring to) > > > -Original Message- > > From: Rick James [mailto:rja...@yahoo-inc.com] > > Sent: Wednesday, June 12, 2013 9:39 AM > > To: Daevid Vincent; mysql@lists.mysql.com > > Cc: 'shawn green' > > Subject: RE: How do I select all rows

RE: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-12 Thread Daevid Vincent
ne 12, 2013 9:39 AM > To: Daevid Vincent; mysql@lists.mysql.com > Cc: 'shawn green' > Subject: RE: How do I select all rows of table that have some rows in > another table (AND, not OR) > > Thinking out of the box... (And posting my reply at the 'wrong' end o

Re: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-12 Thread shawn green
Hello Daevid, On 6/11/2013 7:17 PM, Daevid Vincent wrote: -Original Message- From: shawn green [mailto:shawn.l.gr...@oracle.com] Sent: Tuesday, June 11, 2013 2:16 PM To: mysql@lists.mysql.com Subject: Re: How do I select all rows of table that have some rows in another table (AND

RE: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-12 Thread Rick James
re# field. I would use 32 and INT UNSIGNED.) > -Original Message- > From: Daevid Vincent [mailto:dae...@daevid.com] > Sent: Tuesday, June 11, 2013 4:17 PM > To: mysql@lists.mysql.com > Cc: 'shawn green' > Subject: RE: How do I select all rows of table that have some ro

RE: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-11 Thread Daevid Vincent
> -Original Message- > From: shawn green [mailto:shawn.l.gr...@oracle.com] > Sent: Tuesday, June 11, 2013 2:16 PM > To: mysql@lists.mysql.com > Subject: Re: How do I select all rows of table that have some rows in > another table (AND, not OR) > > Hello Daevid, &

Re: How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-11 Thread shawn green
Hello Daevid, On 6/11/2013 3:59 PM, Daevid Vincent wrote: I am trying to implement a filter so that a user could select various genres they want "in" or "out". Perhaps they like 'action' and 'car chases' but don't like 'foreign' and 'drifting' (or whatever...) So I want something sort of like t

How do I select all rows of table that have some rows in another table (AND, not OR)

2013-06-11 Thread Daevid Vincent
I am trying to implement a filter so that a user could select various genres they want "in" or "out". Perhaps they like 'action' and 'car chases' but don't like 'foreign' and 'drifting' (or whatever...) So I want something sort of like this, however IN() is using an "OR" comparison when I need it