I have a webpage where I would like users to display the images they have uploaded. These images are listed on a mysql database which also contains all the other files which they have uploaded.
I am trying to fetch only the image formats from the database using this query. SELECT * FROM `QandA_files` WHERE `uploaded-by` = '$logged_user' AND `file-url` LIKE '%.png%' OR `file-url` LIKE '%.jpg%' OR `file-url` LIKE '%.jpeg%
but it is not working they way I want.
What I want is to echo only those images which are uploaded by the user which is currently logged in. For example, if klaus is logged in then only show all the images uploaded by klaus.