Ortix Posted February 24, 2015 Share Posted February 24, 2015 I'm writing a small applications with episodes which contain 10-15 screenshots with each screenshot having 5 different resolutions. Every week there are about 20 new episodes. You can imagine that every week I have a lot of screenshots which have to be somehow linked to their respective episode. Currently the filenames are stored in a MySQL database, but after 5 minutes of testing I already have 100+ rows. Not quite sure if that's a smart way of moving forward. The advantage of having them in the DB is that I can easily grab them using Eloquent ORM without having to finnick around with regeneration of filenames for on the fly loading. Are there any good other alternatives of linking multiple files to database entries? Or should I just stick with the current method? What would be some adverse effects of doing it this way? Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted February 24, 2015 Share Posted February 24, 2015 The way you are doing it is the best way, saving image locations in a database. As for different resolutions you can use GD and do it on the fly and only keep one better quality sized image. You could even cache the generated images. A relational database is probably best here, one table would hold your episodes and going by id can link another table with all it's screenshots If posted your database layout and how you query them someone may be able to help further with what you have. Quote Link to comment 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.