set_sql weird cache issues?
[prev]
[thread]
[next]
[Date index for 2005/06/28]
in a parent class 'DBI.pm', I am setting sql:
__PACKAGE__->set_sql("big_join", "select c.name 'customer', p.name 'product', p.notes 'notes' from purchase_order po, product p, customer c where po.product = p.id and po.customer = c.id order by customer");
in my script I am accessing values of the above
my @things = MyApp::M::DBI::list->search_big_join();
the values are accessed (and it all seems to work):
foreach my $t (@things) {
print ">>".$t->customer."\n";
print ">>".$t->notes."\n";
print ">>".$t->product."\n";
}
>>b
>>notes
>>Test product
>>-------------
>>b
>>notes
>>Test product
>>-------------
>>b
>>notes
>>Test product
>>-------------
if run from mysql prompt, the results are totally different
| jon | ad1 | folding helicopter | little nellie |
| jon | ad1 | folding helicopter | little nellie |
| jon | ad1 | folding helicopter | little
However, the amount of rows are correct.
could this be caching working against me? I'm pretty new to this, can I clear down the cache prior to running the query?
o
|
set_sql weird cache issues?
marshyon 19:54 on 28 Jun 2005
|