|
| |
|
|
weweber3
Posts: 15 From: Brunswick, OH 44212 Status: offline
|
Pulling Pictures into Database???!!! - 5/25/2001 14:36:00
Ok I read the tutorial on how to retrieve an image from a database... the problem I have is this. Let's say I have an employee list with name, department, and phone extension and I want to pull their picture on the page too. How is that picture assigned with that name and other data???
|
|
|
|
DarlingBri
Posts: 3123 From: Left of Centre, Cork, Ireland Status: offline
|
RE: Pulling Pictures into Database???!!! - 5/25/2001 14:53:00
Hi there!I'm moving this to Databases so you'll find the help you need. Cheers, Bri ------------------ "Bother," said Pooh, as Piglet was assimilated by the Borg. ------------------- Work, work, work: http://www.appercept.co.uk Out of office hours: http://www.darlingbri.co.uk
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Pulling Pictures into Database???!!! - 5/25/2001 19:36:00
Youll need to add another column into your database using a text field to contain the reference to the image (relative or full path)
|
|
|
|
weweber3
Posts: 15 From: Brunswick, OH 44212 Status: offline
|
RE: Pulling Pictures into Database???!!! - 5/27/2001 20:28:00
can you expand on this, kinda left me hanging. quote: Originally posted by Spooky: Youll need to add another column into your database using a text field to contain the reference to the image (relative or full path)
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Pulling Pictures into Database???!!! - 5/27/2001 20:04:00
Sorry  Youve got a database record associated with 1 user. Name, address, phone etc...Add a new column to the database "imgPerson" Make this a text type and use it to store the reference to the image. eg : http://yoursite.com/images/person1.jpg Now when you diaplay the record for that person, you have access to their photo as a database field. Of course, youll stick the actual photo at http://yoursite.com/images/person1.jpg !
|
|
|
|
campbemr
Posts: 16 From: Ft. Mitchell, Ky, US Status: offline
|
RE: Pulling Pictures into Database???!!! - 5/29/2001 20:55:00
I also would like to do something like this but I would want the person to upload the picture. How could this be done.
|
|
|
|
weweber3
Posts: 15 From: Brunswick, OH 44212 Status: offline
|
RE: Pulling Pictures into Database???!!! - 5/29/2001 20:55:00
Ok, but I want the pic to come up automatically... quote: Originally posted by Spooky: Sorry  Youve got a database record associated with 1 user. Name, address, phone etc...Add a new column to the database "imgPerson" Make this a text type and use it to store the reference to the image. eg : http://yoursite.com/images/person1.jpg Now when you diaplay the record for that person, you have access to their photo as a database field. Of course, youll stick the actual photo at http://yoursite.com/images/person1.jpg !
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Pulling Pictures into Database???!!! - 5/29/2001 20:11:00
Ummm.. Explain how you mean the picture comes up automatically? It will need to come as a result of a database query?
|
|
|
|
weweber3
Posts: 15 From: Brunswick, OH 44212 Status: offline
|
RE: Pulling Pictures into Database???!!! - 5/30/2001 20:25:00
Right, like I have the following database called COMPANY and a table called EMP with fields LASTNAME, FIRSTNAME and TITLE the query would be select * from EMP where LASTNAME='S' That would bring up anyone with last name starting with an S How can I tie the pic to each one of the S's, say there are about 15 people with a last name started with S, I need a different pic associated with each one of them...
quote: Originally posted by Spooky: Ummm.. Explain how you mean the picture comes up automatically? It will need to come as a result of a database query?
|
|
|
|
jondaker
Posts: 2 From: None Status: offline
|
RE: Pulling Pictures into Database???!!! - 6/2/2001 20:48:00
An alternative method is to insert an image—in a database region—as follows:../images/Physics/<%=FP_FieldVal(fp_rs,"Last")%>.jpg The only catch is the picture file name, minus the extention needs to be in the DB. There are many options with this. You can see that script in action here: http://130.65.82.150/faculty/Physics/physicsdir.asp and clicking on a name. Some don’t have Photos, but Joseph Becker does. Cheers.
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Pulling Pictures into Database???!!! - 6/2/2001 17:07:00
Thats where you need to add the extra column.Each picture is associated with 1 record. So as well as columns LASTNAME, FIRSTNAME and TITLE . You would add "USR_IMAGE" So when you query "s" and return 20 records, each record will have its unique picture that (as its from the database) you can use to display jondaker makes a good point, you can use the last / first name to display photos. You need to be sure that each name is unique however. Its no good if you have 5 John Smiths :) ------------------ §þððk¥ "I am Spooky of Borg. Prepare to be assimilated, babycakes!" Subscribe to OutFront News Database / DRW Q & A The Spooky Login!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|