MySQL Forums
Forum List  »  Newbie

`myEnum` LIKE 'foo'
Posted by: Claude Martin
Date: July 25, 2005 05:32AM

im very confused now. `genre` is a enum field with all genres i have. usually i would do this:

SELECT * FROM movies WHERE genre LIKE 'Comedy'

and this works fine.

but this does not work:

SELECT * FROM `movies` WHERE `genre` LIKE 'TV-Series'

it reurns 0 rows (but I have some TV-series in my movies list!)

instead, i use this now:

SELECT * FROM `movies` WHERE `genre` LIKE '%TV-Series%'

But I don't understand why it does not work without the "%". is seems to work with all other genres...
can somebody explain this to me?

Thanks a lot.
Claude

http://animalliberation.tk http://veganismus.ch
http://maqi.de http://tierrechtskochbuch.de

Options: ReplyQuote


Subject
Written By
Posted
`myEnum` LIKE 'foo'
July 25, 2005 05:32AM
July 25, 2005 05:35AM
July 25, 2005 05:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.