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

please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, upda

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

How to Create a Dynamic table
col1 col2 date1 date2 date3 date4..........
a b v1 v2 v3 v4

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

gmmktime or mktime
I live in the UK, i am within the GMT (with daylight saving time ie 1 hour difrence between summer a

Give me all your tricks for minimizing jar file size

Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w

help with email script...
hey

I need help with my mail script

when the form on http://www.mcgdesignstudio.com/c

MII Netweaver Server stopped due to CPIC connection Problem
Dear Experts,
We have SAP XMII 12.0 setup running on Netweaver 2004s,7.0, Java Stack only.

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