Hello, I run a highly modified version of PT and wanted to ask a question concerning MYSQL query creation.
I store all the images locally, and image file names are constructed from value of SITE_URL+dup_harch+.jpg
Some of the images are renamed later on, and I want to run a query to see how many Not Renamed images do I have.
To the question:
Is it possible to have something similar to:
SELECT * FROM products where dup_harch LIKE '%image_url%'
Explanation of the above :) - I want to select products that have dup_harch value in a PART of image_url value of the same product.
Thanks a lot in advance.
Paul
Hello Paul,
I assume you mean the `dupe_hash` column; and yes you should be able to reference it within a LIKE condition. Have a go with the following SQL:
SELECT * FROM products WHERE image_url LIKE CONCAT('%',dupe_hash,'%');
Hope this helps!
Cheers,
David.