For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > March 2004 > ANNOUNCE: DBD::Sprite does JOINS now!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ANNOUNCE: DBD::Sprite does JOINS now!
Jim Turner's LMAERO News

2004-03-19, 12:55 pm

Greetings fellow Perl/DBI users:

I am pleased to announce that DBD::Sprite now supports basic 2-table
inner-joins as of version 0.50, an oft-requested feature. This is my
first stab at joins and it should be considered alpha. This is the
only type of joins currently supported. Other aspects of DBD::Sprite
should now be considered production quality (but use at your own risk
- no warentees expressed or implied!)

For example, if one had the following 2 tables:

Students:

first last age
================ ============ ===
Joe Smith 20
Susan Mitchel 21
Bob Miller 19
Richard Smith 21

Employees:

first last company
================ ============ ================
Bob Jones Acme
Mike Smith GM
Mark Williams Red Hat

One can now do a query like:

select s.first, s.last, e.company, s.age
from students s, employees e
where s.last = e.last order by s.first, e.company

This would return:

Joe Smith GM 20
Richard Smith GM 21

I know this isn't the best example, but the one I wanted to use is
copyrighted.

Jim Turner
turnerjw@wwol.com



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com