baseportal
Start

baseportal message board

Welcome to the baseportal message board...

Please read the FAQ.

 
 Selected message: To the list 
    Message from Randy M. on 10/13 2003, 15:56 +00:00
    EMail: randy1583@yahoo.com

    Re: sum field 41/51/50


      Thanks for the quick reply. Should i apply new code to both the db:Adress and db:production.

      Randy M.

    Your reply:

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

    Post a new message


 All messages from this thread: To the list 
    Message from Randy M. on 10/9 2003, 21:58 +00:00
    EMail: Randy1583@yahoo.com

    sum field 41/51/50


      What needs to be added to sum field 41/51/50 (complete)
      im not sure if i need java script, HTML code. i know excel , but do not know web design.

      Thanks
      Randy

      <html><head><title>baseportal - Password Protected Database</title>
      </head><body bgcolor=ffffff>
      <br><ul>

      <table cellpadding=2 cellspacing=0 border=0><tr><td></td><td bgcolor=c0d0f0 align=center>&nbsp;<b>All</b>&nbsp;</td><td></td><td bgcolor=e0e0e0 align=center>&nbsp;<a href="baseportal.pl?name_in=RM&password_in=service&htx=/searsdvdtech/PRODUCTION&cmd=do_add">New</a>&nbsp;</td><td></td><td bgcolor=e0e0e0 align=center>&nbsp;<a href="baseportal.pl?name_in=RM&password_in=service&htx=/searsdvdtech/PRODUCTION&cmd=do_search">Search</a>&nbsp;</td><td></td><td bgcolor=e0e0e0 align=center>&nbsp;<a href="/cgi-bin/baseportal.pl?htx=/searsdvdtech/PRODUCTION">Selection</a>&nbsp;</td><td></td><td bgcolor=e0e0e0 align=center>&nbsp;Modify&nbsp;</td><td></td><td bgcolor=e0e0e0 align=center>&nbsp;Details&nbsp;</td><td></td></tr><tr><td></td><td bgcolor=c0d0f0 colspan=11><table border=0 cellpadding=0 cellspacing=0><tr><td height=1></td></tr></table></td></tr></table><p><p>1&nbsp;entry&nbsp;in all:&nbsp;<p><table cellpadding=0 cellspacing=0 border=0 bgcolor=f0f0f0><tr><td><table border=0 cellspacing=2 cellpadding=4><tr bgcolor=c0d0f0><td>Action</td><td>date</td><td>Name</td><td>S.O. Number</td><td>41/51/50 (complete)</td><td>15 (part order)</td></tr><tr><td bgcolor=e0e0e0><font size=1><a href="baseportal.pl?name_in=RM&password_in=service&htx=/searsdvdtech/PRODUCTION&cmd=list&range=0,20&Id=1&cmd=do_mod">Modify</a>&nbsp;|&nbsp;<a href="baseportal.pl?name_in=RM&password_in=service&htx=/searsdvdtech/PRODUCTION&cmd=list&range=0,20&Id=1&cmd=del" onclick="return confirm('Are you sure to delete this entry: 2003.10.07,00:00.00#2#+09:00?')">Delete</a></font></td><td align=right bgcolor=e0e0e0><a href="baseportal.pl?name_in=RM&password_in=service&htx=/searsdvdtech/PRODUCTION&cmd=list&range=0,20&cmd=all&Id=1">10/7/2003</a></td><td bgcolor=e0e0e0><a href="baseportal.pl?htx=/searsdvdtech/PRODUCTION&db=/searsdvdtech/names&Id=0&cmd=all&relation=on">RM</a></td><td bgcolor=e0e0e0>93346905</td><td bgcolor=e0e0e0>X</td><td bgcolor=e0e0e0>&nbsp;</td></tr></table></td></tr></table><br><br>

      <br><center><font face=arial,helvetica size=1>powered by <a href="http://baseportal.com" target="_blank">baseportal.com</a></font></center><br>

     Post a reply

    Message from Christoph Bergmann on 10/11 2003, 20:16 +01:00
    EMail: info@baseportal.com

    Re: sum field 41/51/50


      In baseportal the fields have names ;-)

      So, if you want to calculate the sum of a field you need s.th. like this:

      <loop db=yourdatabase>
      $sum+=$Cash;
      </loop>
      The sum of "Cash" is $sum

      where "Cash" is the name of the field you want to know the sum of...

      Ok? ;-)

     Post a reply

    Message from Randy M. on 10/13 2003, 14:25 +00:00

    Re: sum field 41/51/50


      thank you for the help... since i have used the password protect type of data base.. does this affect the access of the loop ....here is the code applied that works good so far...


      <html><head><title>baseportal - Password Protected Database</title>
      </head><body bgcolor=ffffff>
      <br><ul>

      <perl>

      if($name_in ne "")
      {
      get "Name==!$name_in", "users";

        if($Password ne "" && $Password eq $password_in)
        {
          do_all "", "name_in", "password_in";
        } else
        {
          out "<b>Access denied!</b>";
          $name_in="";
        }

      }

      if($name_in eq "")
      {

      out <<EOF;
      <h2>Sign in</h2>Please sign in:
      <form action="/cgi-bin/baseportal.pl?htx=$htx" method="post" enctype="multipart/form-data">
      <input type=hidden name="htx=" value="$htx">
      <table>
      <tr><td>Name:</td><td><input type="text" name="name_in="></td></tr>
      <tr><td>Passwort:</td><td><input type="password" name="password_in="></td></tr>
      <tr><td></td><td><input type=submit value="Sign in"></td></tr>
      </table></form>
      EOF

      }


      </perl>

      end of woking code ... now here is what i have tried....


      here is the code i need to apply to get the total (sum) of field 41/51/50 (complete)

      <loop db=production>
      $sum+=$41/51/50 (complete);
      </loop>

      if i put in lines after the </perl> i get the following errors...


      Reason: The specified database is not approved for the desired access.

      Solution: Log into your private domain, choose the appropriate database, click on 'Management' and change the rights settings. ]

      [ Error: Permission denied to read /searsdvdtech/production

      Reason: The specified database is not approved for the desired access.

      Solution: Log into your private domain, choose the appropriate database, click on 'Management' and change the rights settings. ]

      [ Error: Unable to open /usr/local/httpd/baseportal_NOACCESS/searsdvdtech/production ]

      [ Error: Unable to lock /searsdvdtech/production ]

      if i put the line in before </perl>

      i get the following error

      [ Error: Perl error in : glob trapped by operation mask at (eval 268) line 32. ]


      so i tried to put the code after </perl> like this

      <html>
      <loop db=production>
      $sum+=$41/51/50 (complete);
      </loop>
      </html>
      still get error...

      does the fact that the field is a checked box type of form matter...

      thanks for your help
            
      Randy Migacz

     Post a reply

    Message from Christoph Bergmann on 10/13 2003, 15:58 +01:00
    EMail: info@baseportal.com

    Re: sum field 41/51/50


      Oops, "41/51/50" is the name of your field? I didn't thought that... ;-)

      I thought you meant the numbers of rows (like excel does it).

      Ok, in this case it should look like this:

      <loop db=production code=perl>
      $sum+=$_loop{"41/51/50"};
      </loop>


      But: Since you use the password protection example its a bit more complex. This code should work:

      <perl>
      if($name_in ne "")
      {
      get "Name==!$name_in", "users";

        if($Password ne "" && $Password eq $password_in)
        {
          do_all "", "name_in", "password_in";

          get "Id==*";
          while(get_next)
          {
            $sum+=$_loop{"41/51/50"};
          }
          out "sum of field 41/51/50: $sum";

        } else
        {
          out "<b>Access denied!</b>";
          $name_in="";
        }
      ...etc.

      Ok?

     Post a reply

    Message from Randy M. on 10/13 2003, 15:56 +00:00
    EMail: randy1583@yahoo.com

    Re: sum field 41/51/50


      Thanks for the quick reply. Should i apply new code to both the db:Adress and db:production.

      Randy M.

     Post a reply


    Message from Christoph Bergmann on 10/14 2003, 07:31 +01:00
    EMail: info@baseportal.com

    Re: sum field 41/51/50


      This depends on what you want ;-)

      Do you have a field named "41/51/50" in both databases? Do you want the sum of this field from both databases?
     Post a reply

    Message from Randy M. on 10/14 2003, 13:49 +00:00
    EMail: randy1583@yahoo.com

    Re: sum field 41/51/50


      I do not have 41/51/50 fields in both databases. I noticed that since i used the password protected type database, that the page info for both the adresses database and the page info for the production database are the same. These datbases are relational for the user id and password lookup in the adresses database in order to password protect production database. I have tried to insert the aditional codes for the sum of the field 41/51/50 in the production database, but still have an error. So i thought i would ask if i need to apply code to both the adresses datbase and the production database, since they both have the same page info , before i tried it out.
     Post a reply

    Message from Christoph Bergmann on 10/14 2003, 16:46 +01:00
    EMail: info@baseportal.de

    Re: sum field 41/51/50


      Can you pls post the link to the page? ;-)
     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