A. Pagaltzis wrote:
> * Bernhard Graf <[EMAIL PROTECTED]> [2006-11-28 23:35]:
> > turned out that this cannot be easily achived, because of
> > shortcomings in SQL::Abstract, which doesn't support
> > placeholders in the FROM-part of a query.
>
> Neither does any database, so I don’t see it as a shortcoming.
Where did you get this?
I tried it with the mysql DBD driver and it worked. Of course there
might be drivers that don't support it.
Try this silly example (that also returns senseless results) with the
email database from my first email if you like:
use DBI;
my $dbh = DBI->connect("DBI:mysql:test");
my $sth = $dbh->prepare(<<'');
SELECT me.title
FROM email me
LEFT JOIN chunk chunks ON chunks.email=me.id
LEFT JOIN chunk chunks_2 ON chunks_2.email=me.id AND chunks.id!=chunks_2.id AND
chunks.data=?
WHERE chunks.mimetype=? AND chunks_2.mimetype IS NULL
$sth->execute('foo', 'text/html');
$sth->bind_columns(\my ($title));
print "title = $title\n" while $sth->fetch;
--
Bernhard Graf
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/