/[gedafe]/trunk/example/mypearls/demo.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/example/mypearls/demo.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by dpavlin, Mon Feb 14 18:52:26 2005 UTC revision 2 by dpavlin, Mon Feb 14 18:59:03 2005 UTC
# Line 56  sub run ($$){ Line 56  sub run ($$){
56          -query => <<SQL,          -query => <<SQL,
57    
58  SELECT customer_id,customer_name,  SELECT customer_id,customer_name,
59         order_id,order_date,order_qty,         orders_id,orders_date,orders_qty,
60         product_hid,product_description         product_hid,product_description
61  FROM customer,order,product  FROM customer,orders,product
62  WHERE order_product=product_id  WHERE orders_product=product_id
63        AND customer_id = ?        AND customer_id = ?
64        AND order_customer = customer_id        AND orders_customer = customer_id
65        AND order_date >= ?        AND orders_date >= ?
66        AND order_date <= ?        AND orders_date <= ?
67  ORDER BY customer_id,order_date,order_id  ORDER BY customer_id,orders_date,orders_id
68    
69  SQL  SQL
70          -param => [ $p->{customer},$p->{start},$p->{end}]          -param => [ $p->{customer},$p->{start},$p->{end}]
# Line 79  $rep->group Line 79  $rep->group
79      -foot => sub { "Total Items Shipped :".rpcnt($field{product_id})."\n" }      -foot => sub { "Total Items Shipped :".rpcnt($field{product_id})."\n" }
80    );    );
81    
82  $rep->group  $rep->group(
83    ( -trigger => sub { $field{order_date} },          -trigger => sub { $field{orders_date} },
84       -head => sub { Orders for $field{order_date}\n"}          -head => sub { "Orders for $field{orders_date}\n" }
85    );  );
86    
87  $rep->body  $rep->body
88      ( -contents => sub {      ( -contents => sub {
89           sprintf "  %10d %7d %8s  %s\n",           sprintf "  %10d %7d %8s  %s\n",
90              $field{order_id},              $field{orders_id},
91              $field{order_qty},              $field{orders_qty},
92              $field{product_hid},              $field{product_hid},
93              $field{product_desc} } );              $field{product_desc} } );
94    

Legend:
Removed from v.1  
changed lines
  Added in v.2

  ViewVC Help
Powered by ViewVC 1.1.26