baseportal
Start

baseportal message board

Welcome to the baseportal message board...

Please read the FAQ.

 
 Selected message: To the list 
    Message from knuckles on 12/12 2003, 16:45 +00:00

    please help me


      when i click [Create a database and a page] it deleats my old database is there eny way to get my old database back cuz it messed my web site up.

    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 12/13 2003, 01:58 +00:00

    compare dates(if)...anyone know how to use this


      ---- baseportal documentation--- (in single quotes)

      'If you want to compare a date in the database with the current date, this can be achieved by using the command:

            if($Date lt date ("now", "internal")) { ... }

      A date can only be compared by using text comparison.'



      Question: this is the "lt" ? in the code above ?right?

      -------baseportal documentation continues--

      'The comparison can also be made using a while... loop in perl. Since loop converts the $Date in the right format automatically, the hash %_raw must be used in order to enable a comparison.'


                  <loop code=perl>
      if($_raw(date) lt date ("now", "internal"))
      {
                  ...
                  }

                  </loop>'

      Question: can you explain this with and example page?

      also i don't see a hash % character in the above code.

      Thanks




       
       

     Post a reply

    Message from Christoph Bergmann on 12/17 2003, 17:46 +01:00
    EMail: info@baseportal.com

    Re: compare dates(if)...anyone know how to use this


      > if($Date lt date ("now", "internal")) { ... }
      > A date can only be compared by using text comparison.'
      > Question: this is the "lt" ? in the code above ?right?

      The "lt" means "less than" (text comparison) and is the same like < in number comparison. Example:

      if("abc" lt "xyz") { out "true"; }

      In the baseportal example

      if($Date lt date ("now", "internal")) { out "$Date is earlier than now."; }

      the "lt" means "less than now" which means "earlier" ,-)

      > also i don't see a hash % character in the above code.

      In Perl you write %hash if you mean the whole hash, but a $hash{...} if you mean one of the hash members. Therefore $_raw{date} is one of the members of the has %_raw

      ok? ;-)

     Post a reply
     
 Messages from 3000 to 3150: 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