Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

72 users online



Insert images into DB

Insert images into DB

Currently viewing this thread: 1 (0 members and 1 guests)


Page 1 out of 2
MichaelS

MichaelS

Neverside Newbie
Status: Offline!

Insert images into DB

Hi Everybody

I Just recently learnt how to use mySQL so I know I've still got alot to learn. I've been searching all over to try and find out exactly how to insert an image into the mySQL database and I havent found anything yet.

I hope you guys can help.
Thanks

PrObLeM

PrObLeM

Neverside Newbie
Status: Offline!

Are you sure you want to do that? Why not just store the images on the server and save the location in the database its alot less overhead in the database.

but here is a tutorial to do save the images into the db. http://hockinson.com/index.php?s=37

___________________

www.sp0rk.com

BigToach

BigToach

Neversidian
Status: Offline!

Yeah It's usually better to just let the file system take care of images rather than the db.

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

schoi

schoi

funny and cheeky
Status: Offline!

why would u want to save a image into db in the first place? I never seen an actuall image store into a db

Last edited by schoi, June 3rd, 2006 01:53 AM (Edited 1 times)

coolaid

coolaid

Oh Yeaa.
Status: Offline!

you dont have to chmod anything, thats one reason...

___________________

scudworkz.com.

BigToach

BigToach

Neversidian
Status: Offline!

lol, it can make them easier to manage, the read time of a db is faster than the filesystem, and makes them easier to protect as well. Bandwidth and transfer time still are the bottleneck and you can always manage and protect images just as well out of the db

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

mcdude

mcdude

Blah
Status: Offline!
Originally posted by schoi:

why would u want to save a image into db in the first place? I never seen an actuall image store into a db

Yeah agree... ask vBulletin though, they used to do that, not sure if they do now though.

schoi

schoi

funny and cheeky
Status: Offline!

really oh nah I dont think it's worth it because the amount of bandwidth it must take. Not to mension if it's a busy site it would put alot of pressure on the db server. Chmoding isn't exactly rocket science.

Noel

Noel

Nobody fucks with my title.
Status: Offline!
Originally posted by BigToach:

lol, it can make them easier to manage, the read time of a db is faster than the filesystem, and makes them easier to protect as well. Bandwidth and transfer time still are the bottleneck and you can always manage and protect images just as well out of the db

How can the read time of a database be faster than that of a filesystem? When you get down to it, databases are stored on the filesystem. Unless it's somehow cached into memory constantly (insane idea, especially with large images), there's no way the speed of sending an SQL query to a database, retrieving the BLOB result, and spitting that out as an image can be faster than just linking to the file on the filesystem.

___________________

<3

MichaelS

MichaelS

Neverside Newbie
Status: Offline!

Then how would you get the browser to display the image if you only have the path stored in the db

Page 1 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0178 seconds.