[ic] gdbm bug?

Ed LaFrance interchange-users@interchange.redhat.com
Tue Aug 21 17:31:00 2001


At 12:17 PM 08/21/2001 -0700, you wrote:
>I have this is a posters.txt database file (rows numbered for your
>convenience):
>---------------------------
>   item        type                    price
>description                     title
>1.Rainbow-P01 Rainbow Dolphins Poster 25.00 Poster --
>Normal                Rainbow
>2.Rainbow-P02 Rainbow Dolphins Poster 35.00 Poster -- Hand-Signed by
>Artist Rainbow
>3.Eclipse-P01 Eclipse Dolphins Poster 25.00 Poster --
>Normal                Rainbow
>4.Eclipse-P02 Eclipse Dolphins Poster 35.00 Poster -- Hand-Signed by
>Artist Eclipse
>---OTHER LINES, BUT NONE WITH title=Rainbow AND NONE WITH
>title=Eclipse---
>
>I have this in a page:
>---------------------------
>[page search="fi=posters/se=Rainbow/sf=title"]CLICK HERE[/page]
>
>(Rows 1,2,3 should match. I am getting three rows back.)
>
>Problems:
>----------------------------
>[item-field title] returns titles from rows 2,3,4 (not 1,2,3).
>[item-field type] returns nothing for rows 1,3. And the correct result
>for row 2.
>[item-field description] returns what [item-field type] should for rows
>1,3. And the correct results for row 2.
>
>My results page contains this:
>---------------------------
>[search-region]
>     [search-list]
>           <tr>
><td>ITEM: [item-field item]</td>
><td>TYPE: [item-field type]</td>
><td>PRICE: [item-field price]</td>
><td>DESCRIPTION: [item-field description]</td>
><td>TITLE: [item-field title]</td>
>           </tr>
>
>     [/search-list]
>[/search-region]
>
>
>The results I get are this:
>---------------------------
>           <tr>
><td>ITEM: Rainbow-P01</td>
><td>TYPE: </td>
><td>PRICE: 25.00</td>
><td>DESCRIPTION: Rainbow Dolphins Poster</td>
><td>TITLE: Rainbow
></td>
>           </tr>
>
>           <tr>
><td>ITEM: Rainbow-P02</td>
><td>TYPE: Rainbow Dolphins Poster</td>
><td>PRICE: 35.00</td>
><td>DESCRIPTION: Poster -- Hand-Signed by Artist</td>
><td>TITLE: Rainbow</td>
>           </tr>
>
>
>           <tr>
><td>ITEM: Eclipse-P01</td>
><td>TYPE: </td>
><td>PRICE: 25.00</td>
><td>DESCRIPTION: Eclipse Dolphins Poster</td>
><td>TITLE: Eclipse
></td>
>           </tr>
>
>--
>Richard Seymour : Anarchy Software, Inc.
>- * - - * - - - * -+- * - - - * - - * -
>       `°º¤ø,¸             ¸,ø¤º°'
>              `°º¤ø,¸¸,ø¤º°

Could be embedded carriage returns.  Try this (from the shell, in your 
products directory):

perl -i -p -e 's/\r//g' posters.txt

- Ed L.




===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================