SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: $cid image

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2011
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question $cid image

    Hi ,

    Im trying to get my php to retrieve the file path from my table then use it to display the image stored on the hdd.

    can anyone help me here?

    Is there something like the auto increment one that i could use? ($cid = mysql_insert_id($connection)

  2. #2
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    336
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is the filepath & image file name stored in a database? If so, all you would probably need is:

    (untested & assuming mysql)
    SELECT CONCAT(file_path, '/', image) as image_file FROM images

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2011
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes my sql,

    no the image isnt on a database just the path

  4. #4
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    69 Post(s)
    Tagged
    0 Thread(s)


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
  •