in reply to prepare_cached warning

Unless you fetch to the end of the results (when $sth->fetchrow* returns false), the statement handle is active. So you can either call $sth->finish(), or call one of the selectrow_* methods (you can still use prepare_cached, just pass selectrow_* the statement handle instead of a sql statement).

Replies are listed 'Best First'.
Re^2: prepare_cached warning
by HarshaHegde (Sexton) on Jun 15, 2007 at 19:19 UTC
    runrig,

    Thank You. selectrow works well. Also, does calling $sth->finish, affect the "caching" of the prepared statement?

      does calling $sth->finish, affect the "caching" of the prepared statement?

      No. But if you use selectrow_, there is no need to call finish().