SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Sep 2001
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    using links as a value

    Hi,
    I am creating a database for images. Fine so far, except when I use the 'describe' command, the fields containing the links have 0 as their value.
    This is the code:
    Can anyone help?
    Dee

    insert into items (ItemName,ItemDescription,ItemThumb,ItemFull,Price)
    VALUES ('leopard','leopardskin','ahref="C:/frame/thumb/leosma.jpg"','ahref="C:\frame\leopard.jpg"','29.99');

  2. #2
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Could you please elaborate a little, I'd like to help, but frankly, I have no idea what the hell you are trying to do.

    Also, there is no "describe" command in PHP - is this some function or class you are using?

    It would also be of great help if you posted the table in question.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  3. #3
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i hope you don't plan on using stuff like ahref="C:/frame/thumb/leosma.jpg in a url.
    2 reasons:

    1. It won't work for anyone but you.
    2. if you tried to put that into html, it woudln't even print up a link without a href being seperated.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  4. #4
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which type are you using in your table definition to store the URLs?
    Maybe you can use something like this

    CREATE TABLE images (
    ItemID INT NOT NULL PRIMARY KEY AUTO_INCREMENT
    ItemName VARCHAR(50),
    ItemDescription VARCHAR(150),
    ItemThumb VARCHAR(50),
    ItemFull VARCHAR(50),
    Price DECIMAL(5,2)
    )

    Paul

  5. #5
    SitePoint Member
    Join Date
    Sep 2001
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help Paul.
    As you guessed, I was using the wrong type to store the URL's.
    Cheers!
    Dee

  6. #6
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome Dee


Bookmarks

Posting Permissions

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