baseportal
Start

baseportal message board

Welcome to the baseportal message board...

Please read the FAQ.

 
 Selected message: To the list 
    Message from Christoph Bergmann on 12/17 2002, 18:03 +01:00
    EMail: info@baseportal.com

    Re: How does search work?


      Your belief is true ;-) Searching only works from the start of a field (see http://baseportal.com/doku/index.html#a20 ). Right now there is no way of searching in the middle of a text (there is one in the rental version which is not available right now :-( ) except searching through all fields with extra code. This is a bit more complicated than just using <do action=all...> and it could look something like

      <loop code=perl>
      if(index($Textfield, "searchstring")>=0)
      {
      out "$Textfield ...and more fields...<br>";
      }
      </loop>

      This outputs all entries where the field "Textfield" contains "searchstring" (any position).

      Hope that helps... ,-)

    Your reply:

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

    Post a new message


 All messages from this thread: To the list 
    Message from Harry Forsdick on 12/17 2002, 15:46 +00:00
    EMail: harry@forsdick.com

    How does search work?


      Hi,

      I'm having trouble underdtanding how searching works, using the simplest way I have found for using baseportal. In particular, here is part of the template I use to render (and control access to) the database:

      <do action=all border=1 datasize=2 sort^=Last range^=0,20 pagebrowse=top buttonbrowse=bottom listtype=list listfields=First,Last,Background,Street,Phone,EMail,Which input=link>

      With this simple fragment of code, I get a very nice web presentation of a database that allows members of a committee to enter contact information.

      The problem I am having is understanding how to search the database. When I click on the "search" tab and fill in a string to search for, I don't get the results I expect to get. In particular, if I am looking for, say, the string "official" in a text field, the search doesn't return a record that contains "the official results". This leades me to believe that search strings only support matches from the start of a field.

      If this is true, I am wondering is there some additional syntax I can use to get the results I want? What notation is use to search for patterns?

      Thanks,
           Harry

     Post a reply

    Message from Christoph Bergmann on 12/17 2002, 18:03 +01:00
    EMail: info@baseportal.com

    Re: How does search work?


      Your belief is true ;-) Searching only works from the start of a field (see http://baseportal.com/doku/index.html#a20 ). Right now there is no way of searching in the middle of a text (there is one in the rental version which is not available right now :-( ) except searching through all fields with extra code. This is a bit more complicated than just using <do action=all...> and it could look something like

      <loop code=perl>
      if(index($Textfield, "searchstring")>=0)
      {
      out "$Textfield ...and more fields...<br>";
      }
      </loop>

      This outputs all entries where the field "Textfield" contains "searchstring" (any position).

      Hope that helps... ,-)

     Post a reply
     

 Messages from 3150 to 3300: 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