kabar916 Posted October 1, 2011 Share Posted October 1, 2011 Hello you guys. i have a big problem. i have a folder full of images. Each image name is the product id#. How can i put these id#'s into a table format so i can combine it with another table and figure out what images i am missing. I hope this is making sense. Quote Link to comment https://forums.phpfreaks.com/topic/248223-image-question-putting-image-name-in-to-a-table/ Share on other sites More sharing options...
awjudd Posted October 1, 2011 Share Posted October 1, 2011 Solution 1: - Create a table that has ProductId, ImagePath. - Cycle through all images within your folder and INSERT the values into the previously created table - Run a join against the table you are checking for Solution 2: - Cycle through all products in your database checking in the images folder if there is an image - If there isn't then display it ~juddster Quote Link to comment https://forums.phpfreaks.com/topic/248223-image-question-putting-image-name-in-to-a-table/#findComment-1274686 Share on other sites More sharing options...
kabar916 Posted October 3, 2011 Author Share Posted October 3, 2011 Thank you for the reply. Now i have another question. How do i cycle through the images, like you stated in the directions. Quote Link to comment https://forums.phpfreaks.com/topic/248223-image-question-putting-image-name-in-to-a-table/#findComment-1275074 Share on other sites More sharing options...
awjudd Posted October 3, 2011 Share Posted October 3, 2011 By using any of php's built in directory functions? i.e. scandir ~juddster Quote Link to comment https://forums.phpfreaks.com/topic/248223-image-question-putting-image-name-in-to-a-table/#findComment-1275079 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.