Jump to content

How to get users information from a family tree?

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

How to get users information from a family tree? Rate Topic: -----

#1 User is offline   yakovw 

  • W.R. Private
  • Group: Members
  • Posts: 2
  • Joined: 02-February 08

Post icon  Posted 03 February 2008 - 10:53 AM

Hallo

Please help on this asp programming.

I want to display family members details from access db - (Family.mdb)
I have many records of families members with these details:
Name; Fname; Pname; Age; Phone; Email; Address; Son_No
I have a Page called: All.asp
There, I list All the "Pname - Fname" - each is a link to: ShowFamily.asp (Pname = Parent's name, Fname = last name)

If I choose: "Maria_Dan" I go to: ShowFamily.asp?Pname=Maria_Dan page.

How do I get the right children's to the Chosen Family from the other page: (All.asp)

I want to display the Chosen Family, Parent's name at first (Parent's name is Unique) and bellow
All family members (order by "Son_No").
How can I gather all the children's of "Maria_Dan Griffin" display this way:

Maria & Dan Griffin

Drew Griffin
18, student, living in London
Email…Phone….

Mike Griffin
24, student, living in Oxford
Email…Phone….

Son No 3…


Thank you.
Yakov
0

#2 User is offline   Catalyst 

  • Codesmith
  • Group: Administrators
  • Posts: 1,049
  • Joined: 04-April 06
  • Gender:Male
  • Location:San Diego

Posted 03 February 2008 - 10:52 PM

If I understand you want to get all the children of Maria_Dan, so you do a SQL query like:

SELECT * FROM tablename WHERE pname='Maria_Dan'

and just swap out Maria_Dan with your querystring value for Pname. Note: You should cleanse the querystring before you use it so that someone can't do a SQL injection attack on your database.

See http://www.4guysfrom.../061902-1.shtml for example

So

sql = "SELECT * FROM tablename WHERE pname='" & Replace(Request.Querystring("pname"), "'", "''") & "'"
0

#3 User is offline   yakovw 

  • W.R. Private
  • Group: Members
  • Posts: 2
  • Joined: 02-February 08

Posted 04 February 2008 - 02:47 PM

Thanks!

I'll try to do so.

Yakov
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users