April 23, 200818 yr Have been working on many things lately, probably the most challenging is a script I wrote that displays live text updates of a football match. It uses a desktop app I wrote in VB to input data to the mysql DB and uses AJAX and PHP to send and retreive information. I'm having a problem, well maybe not a problem as such but need peoples views on the most efficent way to display the teams badges on the page. As the teams obviously change every match its not just a case of sticking a couple of images directly in the page. There is an option on the desktop app I wrote which lets you pick the teams. This all works fine but how best can I display the images. Do you think storing them in the DB (they are small only 25*25px) or store values in the DB and maybe have a javascript array with all the images and use the stored values to choose the correct image. If javascript is turned off the names are still displayed so this is not a problem. Although I have self taught myself the basics of using mysql but my knowledge of working with images is not great. I can get it to work as i wish but don't know if it is the most efficient method of doing what I want. Maybe I could just store the url of the image in the DB, i'm kinda stuck choosing which way to go. Any thoughts.
April 23, 200818 yr As I see it every database request slows a site down so the less you store in there the quicker the site will be, IMHO you'd be better off putting the image URL into the database and storing the images separately in a folder. The image URL would be associated with the team so all you'd do is call in the approripate URL when displaying the page...
April 24, 200818 yr Author Ye was playing about with the ideas last night and storing the url seemed to be the better option. Thanks guys.
Create an account or sign in to comment