Saturday, 24 August 2013

Mysql/php: Select file extension types simple query?

Mysql/php: Select file extension types simple query?

I am trying to select all images from table. My column is file_ext and
contains jpg, jpeg, mp3, avi and so on extensions.
How can i create SQL query like this?: AND file_ext = 'jpg, jpeg' or to
select all extensions AND file_ext = '*' Because I do not want to write
AND file_ext = 'jpg' AND file_ext = 'jpeg' ....
How do you guys solve problems like this? Thanks!

No comments:

Post a Comment