Re: Using 'in' in add_constructor
[prev]
[thread]
[next]
[Date index for 2004/09/27]
>>>>> "You" == <Daniel.Brunkhorst@xxxxxxxx.xx> writes:
You> __PACKAGE__-> add_constructor( links_in => 'link_id in ( ? )' );
You> If I understand the way add_constructor works correctly, this is
You> equivalent to
You> select __ESSENTIAL__ from __TABLE__ where link_id in ( ? )
You> Correct?
Correct, and that's your problem. One "?" is one value.
Not a list of values. You'll have to prepare a different links_in2
for two items, like 'link_id in (?, ?)' and so on.
That's partly why I headed to the more general (and yet nearly
as fast) solution wrapped around SQL::Abstract. Search the CDBI
Wiki for my name or SQL::Abstract.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
|
|
Re: Using 'in' in add_constructor
merlyn (Randal L. Schwartz) 11:46 on 27 Sep 2004
|