|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
online scouting database + picture question
Just so you all know, there are currently 27 teams registered on the team 96 scouting database, so if any of you are looking to do some scouting I would suggest you check it out there (www.team96.org).
Now, for my question- I'm using a MySQL database to run the scouting program, and I was wondering if it was possible to store pictured into the database. I know the blob type is for storing binary data, but how would I go about putting a picture in there, and then how would I have it display? |
|
#2
|
|||||
|
|||||
|
Re: online scouting database + picture question
Quote:
grab the file, first. Code:
@ob_start();
$output = @readfile("/path/to/file.jpg"); // could be url
$theImage = @ob_get_contents();
@ob_end_clean();
Code:
"INSERT INTO table (id,column) VALUES ('','".addslashes($theImage)."')"'
Code:
@header('Content-Type: image/jpeg');
// echo out contents of that column you just updated
|
|
#3
|
|||
|
|||
|
Re: online scouting database + picture question
Take the JPEG file, read it into a blob, and when you want to recreate it I believe PHP has some functions for doing so. If not, you could always create a temporary file and write the data back.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scouting Database | Robert Hafner | General Forum | 4 | 20-02-2004 23:37 |
| Übergeeks scouting database, and the competitions | Jeremy_Mc | Scouting | 10 | 09-03-2003 00:26 |
| Looking for a scouting database.... | archiver | 2001 | 7 | 24-06-2002 00:50 |
| Scouting Database | archiver | 1999 | 1 | 23-06-2002 22:28 |
| Question about picture | CaptainPlaid | Electrical | 10 | 22-02-2002 18:00 |