In order to be able to simulate substr from PHP and mysql, I want to do something like
select * from table where last_four_chars(field) = \'.png\'
SELECT * FROM table WHERE SUBSTRING( field, -4 ) = '.png'