[ic] search-region/query conflict? - Please Help

Mike Heins mike at perusion.com
Wed Jun 23 20:15:37 EDT 2004


Quoting Thomas J.M. Burton (tom at globalfocusdm.com):
> Mike Heins wrote:
> >Quoting Thomas J.M. Burton (tom at globalfocusdm.com):
> >>>Mike Heins wrote:
> >>>I don't understand why you are only getting two things, but I think
> >>>you have a more basic thing that should be done.
> >>>
> >>>This is normal for IC:
> >>>
> >>> [perl tables="promotions"]
> >>>   # Query promotions table
> >>>   my $sql = qq{SELECT code,discount_amount
> >>>      FROM promotions ORDER BY type,active_month};
> >>>
> >>>   my $db = $Db{promotions};
> >>>
> >>>   my $hash_results = $db->query({ sql => $sql, hashref => 1 });
> >>>
> >>>   # Loop through query results, output text
> >>>   foreach my $row (@$hash_results) {
> >>>     $out.= "$row->{code}	";
> >>>     $out.= "$row->{discount_amount}\n";
> >>>   }
> >>>
> >>>   return $out;
> >>> [/perl]
> >>
> >>
> >>Thanks for the tip, Mike. It's nice to have a simple example of how that 
> >>code should be done. However, this does still leave me with my 
> >>problem...and if you don't know why the full query results are not being 
> >>returned, then who does?
> >
> >
> >If they are not being returned with that code, there is something wrong
> >with your database. I note you don't mention what it is or what its
> >structure and IC configuration is....
> >
> 
> Full results are returned when that code is used in any page besides the 
> results.html page, in which it only returns two results.
> 
> I'm using the default DB, set up as follows:
> 
> dbconf/default_db/promotions.dbm
> Database            promotions     promotions.txt      TAB
> Database            promotions     HOT                 1

Aha. I don't think you can count on that working. You want to
use MySQL if this catalog is to get any traffic at all.

You may be able to add a ml => 1000 but it is probably due to the
table being previously accessed and the each pointer being not all the
way at the end.

Try exporting with [export promotions].

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

Friends don't let friends use Outlook. -- Bob Blaylock


More information about the interchange-users mailing list