4 Replies - 473 Views - Last Post: 17 June 2012 - 06:44 AM Rate Topic: -----

#1 mon mon  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 128
  • Joined: 31-December 09

insert image in My sql

Posted 17 June 2012 - 05:18 AM

how to insert image in My sql?
and view it in site?
Is This A Good Question/Topic? 0
  • +

Replies To: insert image in My sql

#2 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6233
  • View blog
  • Posts: 10,782
  • Joined: 28-September 07

Re: insert image in My sql

Posted 17 June 2012 - 05:44 AM

There are a couple ways to do this:

One is to use the blob data type and store the actual image in the database. Depending on the number of images being stored, this can result in a database that is bloated and slow to search.

The other option is to upload the image to a file and use the database to hold data about the image such as the file location, image title, etc.

There are advantages and disadvantages to each method and which method is "better" has been the subject of much debate for many years.

I realize this is a very basic overview, but it should give you enough information to start you on your quest. After you've started writing some of the code, feel free to drop in again with any problems or questions you may have!

Good luck!
Was This Post Helpful? 0
  • +
  • -

#3 mon mon  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 128
  • Joined: 31-December 09

Re: insert image in My sql

Posted 17 June 2012 - 06:25 AM

i want steps or example to can make the second method
how to begin?
i make table only in database with name images
and the attributes are title, image,id
Was This Post Helpful? -1
  • +
  • -

#4 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6233
  • View blog
  • Posts: 10,782
  • Joined: 28-September 07

Re: insert image in My sql

Posted 17 June 2012 - 06:34 AM

This is the part where you'll have to do a little research and work on writing some code on your own. I recommend starting with Google. We'll gladly help you work through any problems you may have, but we're not going to write your code for you.
Was This Post Helpful? 1
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6106
  • View blog
  • Posts: 23,653
  • Joined: 23-August 08

Re: insert image in My sql

Posted 17 June 2012 - 06:44 AM

Or for the love of Pete, SEARCH THIS SITE!!!!

Do you realize how often this quedtion is asked and how many answers there are??? Stop being lazy and expecting people to spoon-feed you answers!!!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1