navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Pulling Pictures into Database???!!!

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Pulling Pictures into Database???!!!
Page: [1]
 
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


(in reply to weweber3)
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)

(in reply to weweber3)
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)


(in reply to weweber3)
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 !


(in reply to weweber3)
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.

(in reply to weweber3)
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 !



(in reply to weweber3)
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?

(in reply to weweber3)
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?


(in reply to weweber3)
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.


(in reply to weweber3)
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!


(in reply to weweber3)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Pulling Pictures into Database???!!!
Page: [1]
Jump to: 1





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