Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2012
    Thanked 0 Times in 0 Posts

    Store an image location in mysql db for it to appear in dynamic table.

    Hello All,

    I've got a dynamic table and i want to add a new column that will show the image that i have linked to it.

    How would i save the image location/directory in to the DB so that it would know what image to show for what row/record in the table?

    I am using DW if that helps

  2. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,947 Times in 4,908 Posts
    I am using DW if that helps
    I can't think of anything that hurts more. DW--more accurately named "Nightmare Maker"--produces some of the worst code possible in every language it works with.

    Anyway, this really has nothing to do with DrunkWalker.

    You just need to use some database tool to add the column to your table.
    And then *YOU* need to decide what to store in that column.

    If all your images will be in the same directory, then I'd recommend just storing the name of the image and nothing more. That way, if you move or rename the directory, your database contents don't need to be changed.

    If you are using, say, a two-level sytem (say you have /images/fullsize/butterfly.jpg and /images/thumbnail/butterfly.jpg ), then again store only the last part of the path. Just "fullsize/butterfly.jpg" or "thumbnail/butterfly.jpg". Again, that means you could later move the "images" master directory (or rename it) and the DB contents don't change. Do NOT store the full path to the images.

    I do have to ask: What do you mean by "dynamic table"??
    Be yourself. No one else is as qualified.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts