NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Use a view (Score:1)
While it still requires that you type the query correctly once, views are portable across relational databases (finally even MySQL as of 5.0)
so that you could use this query:
And if you use PostgreSQL as the backend (some other RDBMSes have similar support, but MySQL does not), you can even make the view an updatable view by creating rules that will add appropriate entries to the base table whenever you send an
INSERT,UPDATE, orDELETEinstruction. And PostgreSQL will let you write the rules in Perl.Reply to This
Re:Use a view (Score:2)
Aside from the "write rules in Perl" part, we actually use "updateable" views with Postgres (and SQLite) all the time where I work. It's very handy.