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

Thomas J.M. Burton tom at globalfocusdm.com
Wed Jun 23 18:35:17 EDT 2004


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


products/promotions.txt
code	type	active_month	timed	start_date	end_date	use_year 
discount_skus	discount_type	discount_amount	dep_1	dep_op_1 
dep_val_1	dep_2	dep_op_2	dep_val_2	dep_3	dep_op_3	dep_val_3	dep_4 
dep_op_4	dep_val_4	description_1	url	link_text	description_2 
teaser_text	cart_text
PR00004	1	04		20040607	20040607	 
MAXI-SPEED,MULTI-SPEED,VTRAINER	1	10													 
search="/co=yes/fi=products/sf=show_thumb/se=1/sf=category/se=equipment/sf=code/se=MULTI-SPEED|MAXI-SPEED|VTRAINER/tf=sortord/va=promo=1"
PR00011	1	11		20040607	20040607	 
A-LADDER,B-LADDER,B-LADDER-JR	1	10													 
search="/co=yes/fi=products/sf=show_thumb/se=1/sf=category/se=equipment/sf=code/se=A-LADDER|B-LADDER|S-LADDER|S-LADDER-JR/tf=sortord/va=promo=1"
PR00002	1	02		20040607	20040607	 
HURDLE,HURDLE-12,HURDLE-6	1	10														HURDLE
PR00008	1	08		20040607	20040607	 
S-BALL,S-BALL-65,S-BALL-55,S-BALL-75	1	10														S-BALL
PR00006	1	06		20040607	20040607	 
A-LADDER,B-LADDER,B-LADDER-JR	1	10													 
search="/co=yes/fi=products/sf=show_thumb/se=1/sf=category/se=equipment/sf=code/se=A-LADDER|B-LADDER|S-LADDER|S-LADDER-JR/tf=sortord/va=promo=1"
PR00012	1	12		20040607	20040607			1	10	cat	1	videos											videos
PR00010	1	10		20040607	20040607		BJR,SJR,CWROPE	1	10													 
search="/co=yes/fi=products/sf=show_thumb/se=1/sf=category/se=equipment/sf=code/se=BJR|SJR|CWROPE/tf=sortord/va=promo=1"
PR00009	1	09		20040607	20040607	 
DMB,MB,DMB-10,DMB-02,DMB-08,DMB-06,DMB-04,MB-3,MB-2,MB-5,MB-4	1	10							 
					 
search="/co=yes/fi=products/sf=show_thumb/se=1/sf=category/se=equipment/sf=code/se=DMB|MB/tf=sortord/va=promo=1"
PR00007	1	07		20040607	20040607			1	10													 
search="/co=yes/fi=products/sf=show_thumb/se=1/sf=category/se=training/sf=code/se=WRK-baseball|WRK-basketball|WRK-football|WRK-soccer|WRK-volleyball/tf=sortord/va=promo=1"
PR00005	1	05		20040607	20040607		LRESIST	1	10														LRESIST
PR00003	1	03		20040607	20040607		SVEST	1	10														SVEST
PR00001	1	01		20040607	20040607		S-BALL,S-BALL-65,S-BALL-55,S-BALL-75	1	10
PR00033	2			20040609	20040609		SFV-020	1	10	itemqty	2	HURDLE6=6,HURDLE12=6
PR00028	2			20040609	20040609		SFV-011	1	10	item	1 
A-LADDER,VTRAINER,MAXSPEEDB,MAXSPEEDV															Promo Price (ordered 
with related equipment)


Hope that's what you were asking.

Thanks,
Tom


-- 
________________________________________
Thomas J.M. Burton
Design & Production Director
Global Focus Digital Media, LLC
www.globalfocusdm.com



More information about the interchange-users mailing list