On Tue, 26 Sep 2006 21:48:00 -0700, janra at write-on.org said:
> Do you have any error messages in your apache error log?

No.  The only time I got an error message was when I tried to called
fetchrow_hashref on the undefined $sth.

> If you load the page a third time, or a fourth, does it continue to  
> cause an error or does it sometimes randomly work a few page loads  
> later?

Each time I reload, it does not work.  It seems that if I wait a few
minutes, and then reload, it works.

> Have you tried completely stopping then starting apache? (I've found  
> that errors that show up on one request but not on another are  
> sometimes caused by the cache getting out of sync between apache  
> threads, and stop/starting apache resets that.)

It always works the first time after I restart apache.  So maybe it is a
cache problem?  I thought it might be.  That's why I put NOCACHE => 1
into the query.  Maybe I got the syntax for that wrong?  (NOCACHE isn't
documented, so maybe it is not supported anymore...?)

> 
> Nothing in the query immediately jumps out at me as being wrong,  
> apart from the nonsense words substituted for your table and field  
> names :-)
> 
> -janra
> 
> On 26-Sep-06, at 6:59 PM, johnzenger at mailc.net wrote:
> 
> > So I've got a page that is generated mostly from the results of a  
> > single
> > db_select query.  The first time I load the page, it all works fine.
> > Then, I hit reload, and db_select does not return a sth, but instead
> > returns an undefined value.
> >
> > Is this a problem with how I've set up MySQL?  Or am is there  
> > something
> > wrong with my query statement?:
> >
> >     my ($rv, $sth) = $S->db_select({
> >         WHAT => qq~foreignk, anotherk, DATE_FORMAT(date_made, "%e % 
> > b %Y
> >         %T") AS date, field, ornate_field, prkey, quack~,
> >         FROM => 'supertable',
> >         WHERE => "prkey = 5",
> >         ORDER_BY => 'date_made DESC',
> >         NOCACHE => 1
> >     });
> >
> > _______________________________________________
> > Scoop-help mailing list
> > Scoop-help at lists.kuro5hin.org
> > http://lists.kuro5hin.org/mailman/listinfo/scoop-help
>