LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2010, 08:54 AM   #1
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
How to store pictures in a MySQL database in PHP


Hi,
How do I do this? I wish to store the pictures via a "Browse" button on the webpage, and later display them on a particular page on the site.


Thanks.
 
Old 04-29-2010, 08:59 AM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
You can use blob type.
However, I can't recommend it. The pictures better to store on hdd in most cases.
 
Old 04-30-2010, 12:02 PM   #3
phunkymunky
Member
 
Registered: Aug 2003
Location: Glasgow, Scotland
Distribution: Slackware 14.0, Debian 7.0
Posts: 60

Rep: Reputation: 22
I looked into this last year for a small website to allow uploading photos to a website. From the research I found that the majority of people said to avoid putting images into databases unless absolutely necessary, it is a much better practice to upload/store the picture in a directory or wherever and then just store the path and filename in the DB.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Store Network Traffic in MySql Database ??? sanketdangi Linux - Server 6 03-07-2010 08:29 PM
store list items written in cgi script to mysql database gsr_kashyap Programming 5 01-28-2009 01:08 AM
Trying to get PHP to connect to a MySQL Database bassplayer69 Programming 16 03-13-2008 09:27 PM
How to configure Sendmail to store mail in a MySQL database moenterprise Linux - Server 0 08-24-2007 11:59 PM
Store IMAP emails in mySQL database dlublink Linux - Networking 1 01-07-2005 04:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration