in reply to Many-to-many relationships in databases : SOLVED
I'm not the strongest on SQL, but I think you can use 'in' to solve your problem i.e.
SQL syntax may not be perfect - not my main field of expertise
SELECT book FROM BooksAuthors WHERE Author in ('Jones', 'Smith');
SQL syntax may not be perfect - not my main field of expertise
Also look at SQL::Abstract and the extension to Class::DBI that uses it, Class::DBI::AbstractSearch, for an easy way to build these queries dynamically using perl data structures, for any length list of authors.
...reality must take precedence over public relations, for nature cannot be fooled. - R P Feynmann
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Many-to-many relationships in databases
by Corion (Patriarch) on Oct 28, 2005 at 06:37 UTC | |
by terce (Friar) on Oct 28, 2005 at 08:19 UTC | |
by Corion (Patriarch) on Oct 28, 2005 at 08:25 UTC | |
by terce (Friar) on Oct 28, 2005 at 08:38 UTC | |
by Corion (Patriarch) on Oct 28, 2005 at 08:49 UTC | |
|
In Section
Seekers of Perl Wisdom