in reply to Re: CGI-SQL-HTML-Display "no image"
in thread CGI-SQL-HTML-Display "no image"

Thanks for the reply. Sadly, I can't touch the structure of the database. Fixing the problem at the source would be the way I would do it if I could.

Default image is a good idea. Laziness keeps me from wanting to create a separate image for each missing photo, though. (We're talking a hundred or more photos.) If I can think of a way to automate the process, all the better. There must be a module or something out there that would create repetitive images?

  • Comment on Re: Re: CGI-SQL-HTML-Display "no image"

Replies are listed 'Best First'.
Re: Re: Re: CGI-SQL-HTML-Display "no image"
by markjugg (Curate) on May 25, 2003 at 00:45 UTC
    Read the original reply by Zaxo more closely. You don't need a default image for every missing image...you just need one for all the missing images. That's what Zaxo's code above demonstrates.

    Mark

      Thanks, Mark. I realize that, and I agree that Zaxo has the better suggestion. I'm just gleaning ideas though, and creating separate images to link to would be another way to do it, would it not? (One that I'm too lazy to pursue except as a last resort.) I was merely pondering that if one had to do it that way, then there must be some way to make even that painful task easier.
        I see. If this was the case, I would use logic like Zaxo's above to test to see if you need a file, and create a symbolic (or hard) link to the single real default file. This way, at least you've save some disk space, and have the oppurtunity to update to the image in 1 place instead of N.

        Using a single image would have additional advantage of being cached in the browser, while having N identical images would mean they all get downloaded to your browser seperately.

        Mark