TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-23-2008, 11:26 PM   #21 (permalink)
The Acquainted
 
Join Date: Sep 2007
Posts: 126
Thanks: 4
Sam Granger is on a distinguished road
Default

Storing files in DB? I'm no expert so I might be mistaken with what I'm about to say, sorry if I am.

Connecting to the DB server, logging in, getting data from sql and outputting it in a file each time to download uses a lot more server resources than just going to a static file to download.
Sam Granger is offline  
Reply With Quote
Old 02-24-2008, 12:01 AM   #22 (permalink)
WebDev'n Beer Drnkn' Fool
 
stewart's Avatar
 
Join Date: Dec 2007
Location: Denver, CO
Posts: 59
Thanks: 2
stewart is on a distinguished road
Default

Sorry, but no. And also last I knew, storing and receiving binary data is just a bit different than retrieving a 255 character string.
__________________
stewart::howe
Web Developer & Programmer
CelerMedia.Com | iAmStewart.com | CelerLabs.com
Send a message via ICQ to stewart Send a message via AIM to stewart Send a message via MSN to stewart Send a message via Yahoo to stewart
stewart is offline  
Reply With Quote
Old 02-25-2008, 04:23 PM   #23 (permalink)
The Wanderer
 
Join Date: Jan 2008
Posts: 21
Thanks: 0
Speeple is on a distinguished road
Default

This looks interesting from the perspective of using MySQL to store large sets of binary data:
Scalable BLOB Streaming Infrastructure for MySQL
__________________
AKA Martin Gallagher
Speeple is offline  
Reply With Quote
Old 02-25-2008, 04:58 PM   #24 (permalink)
The Contributor
 
flyingbuddha's Avatar
 
Join Date: Jan 2008
Location: Birmingham, UK
Posts: 60
Thanks: 10
flyingbuddha is on a distinguished road
Default

I once used to build databases that stored files, instead of references, the problem I experienced was when you stored several large files, you start to weigh the db down and it can become unweildy, though saying that, I stored them in longtext fields, not blob's, don't know if that makes a difference?
__________________
Pro. Geek
http://www.mikeholloway.co.uk
flyingbuddha is offline  
Reply With Quote
Old 02-25-2008, 05:03 PM   #25 (permalink)
Nor
The Addict
 
Join Date: Nov 2007
Posts: 282
Thanks: 61
Nor is on a distinguished road
Default

So you telling me I can read a image file and put the image data into a query and if I use the correct query the image will be fine displaying?
__________________
PHP/XHTML Freelancer:
Cleanscript.com v3 - Programming starting at just $5 act now!
Nor is offline  
Reply With Quote
Old 02-27-2008, 09:24 AM   #26 (permalink)
The Contributor
 
flyingbuddha's Avatar
 
Join Date: Jan 2008
Location: Birmingham, UK
Posts: 60
Thanks: 10
flyingbuddha is on a distinguished road
Default

Nor, you could do a:
PHP Code:
$data file_get_contents('image.jpg'
and store $data in the record, then using the correct headers, output the data in a script - that way the image will be output. All you need to do then is call that script using <img src="script.php"...
__________________
Pro. Geek
http://www.mikeholloway.co.uk
flyingbuddha is offline  
Reply With Quote
The Following User Says Thank You to flyingbuddha For This Useful Post:
Nor (02-29-2008)
Old 02-29-2008, 04:04 PM   #27 (permalink)
Nor
The Addict
 
Join Date: Nov 2007
Posts: 282
Thanks: 61
Nor is on a distinguished road
Default

I see :), thanks.
__________________
PHP/XHTML Freelancer:
Cleanscript.com v3 - Programming starting at just $5 act now!
Nor is offline  
Reply With Quote
Old 03-04-2008, 10:51 AM   #28 (permalink)
The Acquainted
 
EyeDentify's Avatar
 
Join Date: Nov 2007
Location: Sweden
Posts: 106
Thanks: 13
EyeDentify is on a distinguished road
Default

And if you store binary data in a BLOB column remember to use base64_encode() and base64_decode() on that data.

Though the data will be larger when encoded it keeps it somewhat safe from corruption. At least what i have read on PHP.

/EyeDentify
__________________
Of course the whole point of a doomsday machine, would have been lost if you keep it a secret.
EyeDentify is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 07:21 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design