[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Simple question dealing with search-region


At 07:46 AM 10/8/2004, you wrote:

Hi everyone,

I have a simple question about a report I am trying to generate. I would really appreciate any suggestions I could get on this.

Here is what I am trying to do:

I want to create a list of all orders with a pending status. The list will have the order number, fname and lname followed by all the sku's and quantity of each ordered... such as:

1501 - Sample User1
sku1   1   Product1
sku2   1   Product2
sku3   5   Product3

1502 - Sample User2
sku1   3   Product1
sku2   2   Product2
sku3   5   Product3

I can easily extract the list of orders with a status of pending using the following code:

[set page_title]Pending Orders[/set]
[set icon_name]icon_stats.gif[/set]
[set table_perm]1[/set]
<TABLE>
[set first_done][/set]
[search-region more=1 search="
       se=pending
       sf=status
       op=eq
       co=1
       st=db
       fi=transactions
       ml=999999
       "]
[search-list]
<TR>
   <TD ALIGN=LEFT>[item-data transactions code]</TD>
<TD ALIGN=LEFT>[item-data transactions fname] [item-data transactions lname]

[loop search="
                fi=orderline
                st=db
                sf=order_number
                se=[item-code]
                rf=sku,quantity,description
                ml=9999
"]
<br>
[loop-param sku] [loop-param quantity] [loop-param description]
[/loop]

Note: this approach could get quite slow and resource consuming if you have many pending orders; you might want to consider using SQL instead, if you are using an external SQL dbms.

- Ed

</TD>
</TR>
[/search-list]
[/search-region]
</TABLE>

I now need to get a list of all orderline entries based on the code/order_number in my search. Can anyone help me with sample code or pointers in the right direction?

I appreciate all help,
Kip

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          suppressed
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax
===============================================================
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.