joe1986 Posted April 2, 2009 Share Posted April 2, 2009 Hi there, I am currently developing a localhost php application to retrieve report details, etc. from a mysql database. I have an idea at the moment for uploading images to one table in the database (links not blobs) and taking a field from another table comparing the contents of this particular field to the images names in the images table, and if there any matches (or similar) then to display within the PHP page. For example: Table 1 +---------------------------+ | Field 1 | Field 2 | |data123 | data456 | +---------------------------+ Table 2 +----------------------------+ | Field 1 | Field 2 | |data123.jpg | diff.jpg | +----------------------------+ data123 from one table matches data123.jpg from the other table, so that image is displayed. Im not sure how to implement something like this, although I suspect it might be simple "if field = to field then display, else dont" sort of thing...I hope this sort of makes sense. Any suggestions? Cheers Joe Quote Link to comment https://forums.phpfreaks.com/topic/152284-displaying-an-image-within-a-mysql-database-via-php/ Share on other sites More sharing options...
fenway Posted April 3, 2009 Share Posted April 3, 2009 So there's no "proper" foreign key? Quote Link to comment https://forums.phpfreaks.com/topic/152284-displaying-an-image-within-a-mysql-database-via-php/#findComment-800298 Share on other sites More sharing options...
joe1986 Posted April 5, 2009 Author Share Posted April 5, 2009 I havent defined any primary or foreign keys in the table. I have decided to leave the idea now, and to just display an image from the link in a database. Not sure how to do this, but im sure there are tutorials available. If anybody knows of any, please let me know! Cheers Quote Link to comment https://forums.phpfreaks.com/topic/152284-displaying-an-image-within-a-mysql-database-via-php/#findComment-801698 Share on other sites More sharing options...
fenway Posted April 6, 2009 Share Posted April 6, 2009 Maybe I wasn't clear... how are you determining how these rows are related? Quote Link to comment https://forums.phpfreaks.com/topic/152284-displaying-an-image-within-a-mysql-database-via-php/#findComment-801975 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.