baseportal
Start

baseportal message board

Welcome to the baseportal message board...

Please read the FAQ.

 
 Selected message: To the list 
    Message from kelly on 9/23 2003, 19:31 +00:00
    EMail: theonering@thegateroom.com WWW: baseportal.com/baseportal/TheOneRing/Story_archives/Story

    Working with multiple databases - how to manipulate fields


      I have two databases with a relation.

      db=Archive # this database contains story details i.e. Author, Title

      db=Story # this database contains the story contents with multiple chapters i.e. Title, Chapter_numbers, Story

      Note: The entry in db=Archive for "Title" only occurs once. The entry in db=Story for "Title" occurs multiple times depending on the number of chapters in the story.

      For example,
      db=Archive
      Author Title
      ------------------------
      TheOneRing Dark Patches
      Kelly Test


      db=Story
      Author Title Chapter_numbers Story
      ---------------------------------------------------
      TheOneRing Dark Patches 1 (Contents of chapter 1)
      TheOneRing Dark Patches 2 (Contents of chapter 2)
      Kelly Test 1 (Contents of chapter 1)


      Question:
      How do I allow the reader to select the story Title in db=Archive, then code it to find the Title in db=Story and output each chapter of the story?

      The code below works, but the sort is hardcoded as "Title~=D". I need to make the "Title~=D" variable somehow depending on the story the reader wants to read.

      Database=Archive

      <perl>

      get;

      out "<table><tr><td>Title</td><td></td><td>Author</td><td></td><td>Description</td></tr>";
      while(get_next)
      {
      out "<tr><td nowrap><a href=\"http://baseportal.com/baseportal/TheOneRing/Story_archives/Story&Id=$_id\">$Title</a></td><td></td><td>$Author</td><td></td><td>$Description</td></tr>";

      }
      out "</table>";
      </perl>

      Database=Story

      <do action=all Title~=D sort=Chapter_number range^=0,20 databack=- gridcolor=- pagebrowse=no buttonbrowse=no selectbrowse=no indexfield=Chapter_number details=no search=no input=no listtype=list listfields=Story>

      Warning: I'm a perl novice. Could probably write what I need in Fortran, though ;)

    Your reply:

    Name: EMail: WWW:
    Subject:
    Text:
    Timezone:

    Post a new message


 All messages from this thread: To the list 
    Message from Echobat on 9/27 2003, 13:35 +10:00

    User Sign Up and Restrictions


      Hi

      Id like to create a database where outside users sign up for membership. Once they have membership they can add and modify their own entries only! I would also like an admin to be able to change/modify or delete anything.

      Also i would like the entire database to be visible for non members.

      Is this possible ? Please note i have little experience in this area.
     Post a reply

    Message from Kelly on 9/28 2003, 22:26 +00:00
    EMail: theonering@thegateroom.com

    Re: User Sign Up and Restrictions


      Did you try looking at "Passwords for single entries" in the Library? The code should be similar to your needs.
     Post a reply
     
 Messages from 3300 to 3450: To the input form 
<< Newest messages | < Newer messages | To the input form | Older messages > | Oldest messages >>


Back to the homepage

© baseportal.com. All rights reserved. Terms of use



baseportal.com