Mysql/php: Select file extension types simple query? -


i trying select images table. column file_ext , contains jpg, jpeg, mp3, avi , on extensions.

how can create sql query this?: and file_ext = 'jpg, jpeg' or select extensions and file_ext = '*' because not want write and file_ext = 'jpg' , file_ext = 'jpeg' ....

how guys solve problems this? thanks!

try in like

select * table mycondition , file_ext in ('jpg','jpeg','png',....) 

and try avoid mysql_* statements due entire ext/mysql php extension, provides functions named prefix mysql_*, officially deprecated of php v5.5.0 , removed in future.

there 2 other mysql extensions can better use: mysqli , pdo_mysql, either of can used instead of ext/mysql.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -