Go to Post Pro safety tip: put a string through coil springs that is tied off securely on the robot frame. This will help prevent the spring from jumping out and killing an inspector if it snaps. - Ninja_Bait [more]
Home
Go Back   Chief Delphi > Competition > Rules/Strategy > Scouting
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-03-2004, 08:49
Robert Hafner's Avatar
Robert Hafner Robert Hafner is offline
FIRST Alumni
no team
 
Join Date: Mar 2003
Rookie Year: 2000
Location: Springfield. MA
Posts: 34
Robert Hafner is on a distinguished road
Send a message via AIM to Robert Hafner Send a message via MSN to Robert Hafner Send a message via Yahoo to Robert Hafner
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   Spotlight this post!  
Unread 02-03-2004, 09:17
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,270
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
Re: online scouting database + picture question

Quote:
Originally Posted by Robert Hafner
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?
here's some snippets. nothing complete, but it'll get you on the right track, i think.

grab the file, first.
Code:
	  @ob_start();
  	  $output = @readfile("/path/to/file.jpg"); // could be url
  	  $theImage = @ob_get_contents();
  	  @ob_end_clean();
and then run this insert
Code:
"INSERT INTO table (id,column) VALUES ('','".addslashes($theImage)."')"'
to display later, assuming its a jpeg:
Code:
@header('Content-Type: image/jpeg');
 // echo out contents of that column you just updated
__________________
Brandon Martus
e-mail
  #3   Spotlight this post!  
Unread 02-03-2004, 09:25
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 11:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi