Storing/displaying image urls in a database?


Posted on 16th Feb 2014 07:03 pm by admin

Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is added into the db, including url.
However I can't figure out how exactly i should be storing the url for the image.
Did you know?Explore Trending and Topic pages for more stories like this.

What data type should i use? How to insert it/extract it (with the backlashes/etc neeeded) ? Should I store the full http://www.somesite.com/imageurl.jpg or just somesite.com/imageurl.jpg ? (as little as possible)
How do i then display it?

Had a quick search here...no luck finding what i'm looking for..had a look on google but ended up just finding info on the BLOB data type..which would be inserting the actual image binary data into the database i believe.

Any help?

Thanks
No comments posted yet

Your Answer:

Login to answer
264 Like 29 Dislike
Previous forums Next forums
Other forums

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

Require select-option functionality in Module Pool Programming
Hi Gurus,

I am doing a development by Module Pool on Warehouse Management. For that devel

pspell
using pspell, is it possible to get words that would be best in the current phrase?

For examp

Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?

Access database inside of a validation class
Hello,

For quite some time, I have been using functions to validate form input and access the

Help with echo()
I'm having some problems with this code:

Code: echo '
<A HREF="jav

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very

Undefined index on my form
ok im getting Undefined index on this line.. print_r($_REQUEST['form']);

below is the full sc

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash