Re: [PHP] save image in database vs folder

2008-03-12 Thread tedd

At 10:15 AM -0400 3/11/08, Robert Cummings wrote:

On Tue, 2008-03-11 at 11:18 +, Richard Heyes wrote:
  Well, bearing in mind I only have experience of MySQL, the general

 consensus is to save it to a file on you hard drive and store the file
 name in the database. If for whatever reason you can't or don't want to
 do that, then at least store it in a separate table that only gets
 touched when the image is requested.


Can you point me to a link where I can read about this so-called
general consensus? :)

Cheers,
Rob.


There's no general consensus -- it all depends upon needs.

Some needs are better served by using the file system while others 
are better served by using a database.


There's plenty of discussion on this in the archives.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Aschwin Wesselius

Børge Holen wrote:

Topposting here...
dont dont dont... we beat the living crap outa this one. Dont ask, do whatever 
you want and learn from it. 
Fact is that the best one is the one that works best right then and there. 
Dont you dare push this subject any further...



On Tuesday 11 March 2008 12:00:35 jeffry s wrote:
  

some friend of mine ague about this matter, this morning. they say, saving
image in
database is more professional. I am not really agree with that,since i am
just a novice programmer. i am asking
senior php programmer what you opinion about this?

which one is better. save in database or in folder?



You guys seem to be a little sensitive about the subject ;-)

I think I'm gonna dive into the archives then. To see for myself what 
left such a scars upon that subject.

--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


Re: [PHP] save image in database vs folder

2008-03-11 Thread Richard Heyes

some friend of mine ague about this matter, this morning. they say, saving
image in
database is more professional. I am not really agree with that,since i am
just a novice programmer.


Well, bearing in mind I only have experience of MySQL, the general 
consensus is to save it to a file on you hard drive and store the file 
name in the database. If for whatever reason you can't or don't want to 
do that, then at least store it in a separate table that only gets 
touched when the image is requested.


--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Børge Holen
Topposting here...
dont dont dont... we beat the living crap outa this one. Dont ask, do whatever 
you want and learn from it. 
Fact is that the best one is the one that works best right then and there. 
Dont you dare push this subject any further...


On Tuesday 11 March 2008 12:00:35 jeffry s wrote:
 some friend of mine ague about this matter, this morning. they say, saving
 image in
 database is more professional. I am not really agree with that,since i am
 just a novice programmer. i am asking
 senior php programmer what you opinion about this?

 which one is better. save in database or in folder?



-- 
---
Børge Holen
http://www.arivene.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread dev

Quoting jeffry s [EMAIL PROTECTED]:


some friend of mine ague about this matter, this morning. they say, saving
image in
database is more professional. I am not really agree with that,since i am
just a novice programmer. i am asking
senior php programmer what you opinion about this?

which one is better. save in database or in folder?



Not this thread again :) Search the archives for this one. There have  
been numerous discussions about this topic. Personally i don't see  
what would make this technique more professional. It's just a matter  
of taste.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread jeffry s
thanks Richard ..
sorry dev.. i don't know this subject is quite sensitive here :(

 I think I'm gonna dive into the archives then. To see for myself what
 left such a scars upon that subject.

i guess, i have to prepare my oxygen tank to dive into the archives.
i am quite curious to find out what  happen about this..


On Tue, Mar 11, 2008 at 7:18 PM, Richard Heyes [EMAIL PROTECTED] wrote:

  some friend of mine ague about this matter, this morning. they say,
 saving
  image in
  database is more professional. I am not really agree with that,since i
 am
  just a novice programmer.

 Well, bearing in mind I only have experience of MySQL, the general
 consensus is to save it to a file on you hard drive and store the file
 name in the database. If for whatever reason you can't or don't want to
 do that, then at least store it in a separate table that only gets
 touched when the image is requested.

 --
 Richard Heyes
 Employ me:
 http://www.phpguru.org/cv



Re: [PHP] save image in database vs folder

2008-03-11 Thread dev

Quoting jeffry s [EMAIL PROTECTED]:


thanks Richard ..
sorry dev.. i don't know this subject is quite sensitive here :(


It's not so sensitive :) It's just one of those questions that pop''s  
up a lot. And some of those discussions were pretty heated.





I think I'm gonna dive into the archives then. To see for myself what
left such a scars upon that subject.


i guess, i have to prepare my oxygen tank to dive into the archives.
i am quite curious to find out what  happen about this..



Happy diving.



On Tue, Mar 11, 2008 at 7:18 PM, Richard Heyes [EMAIL PROTECTED] wrote:


 some friend of mine ague about this matter, this morning. they say,
saving
 image in
 database is more professional. I am not really agree with that,since i
am
 just a novice programmer.

Well, bearing in mind I only have experience of MySQL, the general
consensus is to save it to a file on you hard drive and store the file
name in the database. If for whatever reason you can't or don't want to
do that, then at least store it in a separate table that only gets
touched when the image is requested.

--
Richard Heyes
Employ me:
http://www.phpguru.org/cv







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Robert Cummings

On Tue, 2008-03-11 at 11:18 +, Richard Heyes wrote:
  some friend of mine ague about this matter, this morning. they say, saving
  image in
  database is more professional. I am not really agree with that,since i am
  just a novice programmer.
 
 Well, bearing in mind I only have experience of MySQL, the general 
 consensus is to save it to a file on you hard drive and store the file 
 name in the database. If for whatever reason you can't or don't want to 
 do that, then at least store it in a separate table that only gets 
 touched when the image is requested.

Can you point me to a link where I can read about this so-called
general consensus? :)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Daniel Brown
On Tue, Mar 11, 2008 at 10:15 AM, Robert Cummings [EMAIL PROTECTED] wrote:

  On Tue, 2008-03-11 at 11:18 +, Richard Heyes wrote:
some friend of mine ague about this matter, this morning. they say, 
 saving
image in
database is more professional. I am not really agree with that,since i am
just a novice programmer.
  
   Well, bearing in mind I only have experience of MySQL, the general
   consensus is to save it to a file on you hard drive and store the file
   name in the database. If for whatever reason you can't or don't want to
   do that, then at least store it in a separate table that only gets
   touched when the image is requested.

  Can you point me to a link where I can read about this so-called
  general consensus? :)

http://www.gfy.com/  ;-P

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread David Giragosian
On 3/11/08, Daniel Brown [EMAIL PROTECTED] wrote:
 On Tue, Mar 11, 2008 at 10:15 AM, Robert Cummings [EMAIL PROTECTED] wrote:
 
   On Tue, 2008-03-11 at 11:18 +, Richard Heyes wrote:
 some friend of mine ague about this matter, this morning. they say, 
  saving
 image in
 database is more professional. I am not really agree with that,since i 
  am
 just a novice programmer.
   
Well, bearing in mind I only have experience of MySQL, the general
consensus is to save it to a file on you hard drive and store the file
name in the database. If for whatever reason you can't or don't want to
do that, then at least store it in a separate table that only gets
touched when the image is requested.
 
   Can you point me to a link where I can read about this so-called
   general consensus? :)

http://www.gfy.com/  ;-P

Whoa! My institution blocked that URL for 'adult content'. I guess
there are some racy example pictures or something?? lol.

:=)

-David.

When the power of love
overcomes the love of power,
the world will know peace.

-Jimi Hendrix

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Daniel Brown
On Tue, Mar 11, 2008 at 10:34 AM, David Giragosian
[EMAIL PROTECTED] wrote:
 On 3/11/08, Daniel Brown [EMAIL PROTECTED] wrote:
  http://www.gfy.com/  ;-P

  Whoa! My institution blocked that URL for 'adult content'. I guess
  there are some racy example pictures or something?? lol.

It's a webmaster forum, but a little err, shall we say,
liberal in graphics and terminology.  In fact, GFY isn't shorthand
for the greatest cartoon character of all time it stands for Go
?=str_rot13('Shpx');? Yourself.

Fun to check out at home, but I probably should've mentioned for
those unaware, it's not entirely recommended to check out at the
office.  In short: NSFW.

Sorry!

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] save image in database vs folder

2008-03-11 Thread Warren Vail
Probably has to do with what GFY means in texting short hand.  Go F...
Yourself ;-).

Warren 

 -Original Message-
 From: David Giragosian [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 11, 2008 7:34 AM
 To: php-general@lists.php.net
 Subject: Re: [PHP] save image in database vs folder
 
 On 3/11/08, Daniel Brown [EMAIL PROTECTED] wrote:
  On Tue, Mar 11, 2008 at 10:15 AM, Robert Cummings 
 [EMAIL PROTECTED] wrote:
  
On Tue, 2008-03-11 at 11:18 +, Richard Heyes wrote:
  some friend of mine ague about this matter, this 
 morning. they 
   say, savingimage indatabase is more 
 professional. I am 
   not really agree with that,since i amjust a novice 
 programmer.

 Well, bearing in mind I only have experience of MySQL, the 
   general   consensus is to save it to a file on you hard 
 drive and 
   store the file   name in the database. If for whatever 
 reason you 
   can't or don't want to   do that, then at least store it in a 
   separate table that only gets   touched when the image 
 is requested.
  
Can you point me to a link where I can read about this 
 so-called  
   general consensus? :)
 
 http://www.gfy.com/  ;-P
 
 Whoa! My institution blocked that URL for 'adult content'. I 
 guess there are some racy example pictures or something?? lol.
 
 :=)
 
 -David.
 
 When the power of love
 overcomes the love of power,
 the world will know peace.
 
 -Jimi Hendrix
 
 --
 PHP General Mailing List (http://www.php.net/) To 
 unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Greg Donald
On 3/11/08, jeffry s [EMAIL PROTECTED] wrote:
  which one is better. save in database or in folder?

The file system _is_ a database.  No need to add more unnescessary layers.

Here is the defacto Zend benchmark on the topic:

http://www.zend.com/zend/trick/tricks-sept-2001.php

It doesn't work for me however, some header/include error.. maybe
there's a mirror or a cache of it some place.  Or perhaps you can
persuade Zend to fix it back to a working state.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Børge Holen
'n here we go againfff

-- 
---
Børge Holen
http://www.arivene.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Daniel Brown
On Tue, Mar 11, 2008 at 11:24 AM, Børge Holen [EMAIL PROTECTED] wrote:
 'n here we go againfff

Børge, the F's are silent.  ;-P

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Børge Holen
On Tuesday 11 March 2008 18:30:13 you wrote:
 On Tue, Mar 11, 2008 at 11:24 AM, Børge Holen [EMAIL PROTECTED] wrote:
  'n here we go againfff

 Børge, the F's are silent.  ;-P


=D


-- 
---
Børge Holen
http://www.arivene.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] save image in database vs folder

2008-03-11 Thread Børge Holen
On Tuesday 11 March 2008 21:24:45 you wrote:
 I've been coding PHP for some time now in combination with MySQL, but I
 have never heard of the possibility of storing images in a database..?

 I didn't even know this was possible.

they are stored as binary objects.
for a strategic search directly at the info:
http://www.google.no/search?hl=noq=mysql+blobbtnG=Google-s%C3%B8kmeta=
for a more learning experience do:
http://www.google.no/search?hl=noq=storing+images+in+mysqlbtnG=S%C3%B8kmeta=


 My question now is, where can I find documentation on this? and where are
 these Archives you are all talking about?

see these archives is not much to brag about, hard to follow and hard to 
search.
Use google. Google is expert in finding weird information regarding stuff you 
put in the search field.

I would also follow up on the read on filesystem handling on php.net if you 
feel shorthanded regarding comparisons.

 (I've subscribed to the mailing-list yesterday, had no idea such a thing
 existed!)

oh, theres plenty of books written on subjects you know nothing about ;D



 Thanks.
   - Rick

 2008/3/11, Børge Holen [EMAIL PROTECTED]:
  On Tuesday 11 March 2008 18:30:13 you wrote:
   On Tue, Mar 11, 2008 at 11:24 AM, Børge Holen [EMAIL PROTECTED] wrote:
'n here we go againfff
  
   Børge, the F's are silent.  ;-P
 
  =D
 
 
 
  --
  ---
  Børge Holen
  http://www.arivene.net
 
  --
 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php



-- 
---
Børge Holen
http://www.arivene.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php