How to display info of a foreign table ?

Results 1 to 2 of 2

Thread: How to display info of a foreign table ?

  1. #1
    Join Date
    Dec 1969

    Default How to display info of a foreign table ?

    I have 2 tables, 1 is the BOOK table (primary), the other is the PUBLISHER table (foreign). When user fills in an on-line form for a particular book, he will need to choose a publisher from a list box (I can create it from the PUBLISHER table). The problem is, how can I display the publisher information (e.g. publisher name, address, email)in the form once the user has selected a publisher from the list box ? I don&#039t want to re-submit the selection to the server and refresh the form. Any effective way to achieve this ? Or can Javascript help ?<BR><BR>Example of the form<BR>===================<BR>Book name : user input<BR>Publisher (user select from a list box)<BR>Publisher name : (display according to selection above)<BR>Publisher address : (display according to selection above)<BR>Publisher email : (display according to selection above)<BR><BR>Thanks.

  2. #2
    Panos Barbalias Guest

    Default RE: How to display info of a foreign table ?

    You should use relations between your tables, so you can assign "books" to "writers" and vice versa..Then, when you want to get records you use a query like:<BR>"SELECT * FROM TABLE1, TABLE2 WHERE IDbook = IDwriter"<BR>It&#039s to difficult to explain the whole theorie..<BR>Try to get a book with relational databases.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts