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.

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

serializing objects - loses methods - the point being?
Hi

I know that serializing an object will lose the methods. But whats the point in that? What

Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho

Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:
"a.b.c.d.e.f&

Varible in trigger - refering to correct schema
Hello

Im having some issues with my trigger.
What I want to do is call opon a differ

Linux socket programming
Where can I find a good introduction to socket programming?

php slowing my site?
Hi all,

I think that one of the reasons that my site doesn't work fast is that the code is ve

! = ''
In the following 'IF' statement if v_ompcat = PU for example then Oracle equates that 'IF' statement

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

Send inserts to mysql thru port 80
Hi!

I have an application that must do some inserts in a mysql db. This db is behind a firewa

comparing tables across databases sql refinement ideas required
Hi all

Via pl/sql I need to ensure that data between tables in different databases match

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