Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

how to generate image thumbnail in html from mysql database
Welcome, Guest. Please login or register.
January 08, 2009, 11:11:28 PM
11313 Posts in 1251 Topics by 508 Members
Latest Member: pissematbox
Experts Round Table Network  |  Serverside Technology  |  PHP  |  how to generate image thumbnail in html from mysql database « previous next »
Pages: [1]
Author Topic: how to generate image thumbnail in html from mysql database  (Read 343 times)
spotonukraj

Offline Offline

Posts: 5


« on: January 24, 2008, 06:34:59 AM »

Hi

I uploaded the image & form data to mysql database, i can retrive text data from database to html as well.  but now i m stuck with image part. please help me if any 1 knows or having php code for that to generate image thumnail from mysql database to html page.

i created two database 1 for text data , another 1 for photos, give me some idea how can i combine both data together in one html page. like example ID CARD : PHOTO, NAME, GENDER, PROFESSION, NATIONALITY, ECT.

THANKS IN ADVANCE   
Logged
GrandSchtroumpf
Mentor

Offline Offline

Posts: 411



« Reply #1 on: January 26, 2008, 09:43:57 AM »

You can use GD to create your thumbnail.  The thumbnail is usually created when the image is uploaded, not to have to create the image for each request.  This means you should have both full-size and thumbnail versions in your database.
Logged
VGR
Mentor

Offline Offline

Posts: 684



WWW
« Reply #2 on: January 27, 2008, 01:26:31 AM »

agree. What I would recommend :
- do not use BLOBs to store the big image
- only store the full file path to the image
- optionally you may store binary (BLOB, LBLOB etc) the thumbnail
- today, file system access is not slower than DB access, it's perhap even faster.
- this will ease DB recovery and backup (smaller footprint)
- this will enable you to edit images manually, compared to updating a BLOB...
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
rdivilbiss
Governing Council Member
*
Offline Offline

Posts: 414



WWW
« Reply #3 on: January 27, 2008, 08:26:01 AM »

agree. What I would recommend :
- do not use BLOBs to store the big image
- only store the full file path to the image
- optionally you may store binary (BLOB, LBLOB etc) the thumbnail
- today, file system access is not slower than DB access, it's perhap even faster.
- this will ease DB recovery and backup (smaller footprint)
- this will enable you to edit images manually, compared to updating a BLOB...

I agree with all VGR says.  Using the file system will be much simpler, quicker, and easier to maintain. "KISS" principal.
Logged

Rod
Pages: [1]
« previous next »
    Jump to: