Re: where clause determined at runtime
[prev]
[thread]
[next]
[Date index for 2005/01/26]
> When I have this situation, I grab the database handle and run my
> generated SQL (using prepare_cached, if I expect it to get repeated) and
> then pass it through sth_to_objects() just like the search_* methods
> would.
If you're looking for some ideas of how to make that generate_some_sql()
one-liner Perrin threw in there return something useful, check out the
UsingJoins recipe[1] in the wiki which has examples of using
SQL::Abstract to create dynamic SQL (yeah, it doesn't make much sense
that this info is in that node).
Good luck,
William
[1] http://www.class-dbi.com/cgi-bin/wiki/index.cgi?UsingJoins
--
Knowmad Services Inc.
http://www.knowmad.com