|
-
Dec 10th, 2001, 07:35 PM
#1
Thread Starter
Member
How....
Ok second time ask for answer. So I have two table
Author and Book
Author table have two fields:
ID_name (number, primary key)
name (text)
Book table tree fields:
title (text)
ID (number)
ID_name (number)
Retationship between table Author and Book is between fields ID_name (from Author) and ID_name (from Book). RS is 1:M
Ok this is MSAccess DB but now I need make form in HTML for input information about book. How I can make an combobox with list all authors from table Author thus when client chose name from list then script automatic fill ID_author in field ID_name in Book table.
Please write source or detaile directed.
Thanks!
-
Dec 11th, 2001, 02:38 AM
#2
Lively Member
Hey,
You should query them all and put them in an array dinamically, I think. Also you should create an event when a new Autor is slected he get the book info and displays that.
Hope this helps a bit.
-
Dec 11th, 2001, 06:11 AM
#3
Thread Starter
Member
But
Please detail describe your solution. Query, dinamic list ... etc.
Thank You!
-
Dec 11th, 2001, 06:27 AM
#4
Lively Member
Something like
Code:
query = "SELECT * FROM Author, Book JOIN ON Author.ID_Name = Book.ID_Name"
open the recordset and than put the records in an array, until you reached the end.
-
Dec 11th, 2001, 11:58 AM
#5
Thread Starter
Member
tell me...
For example I have to fill informations about some book. So I know title and ID but ID_name (author name) which put in input text object but information about author I chose from combobox which contain all authors (Shall I use query now?).
Can you write me that piece of source?
Thank You!
-
Dec 12th, 2001, 02:43 AM
#6
Lively Member
So you want to add new books to the db?
Then you should list all authors and give the combobox the value of author ID and the name in the combobox.
When I have time I'll maybe write soem code alltough I'm more a Javascript fan.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|