[Catalyst] How to bind an array using my own schema

2009-05-13 Thread Jakub Tutaj
y like that in my schema mySuperSchema.pm: SELECT column_id, number FROM table WHERE column_id IN (?) AND number != ? Now I get an error: "Cannot bind unknown placeholder 3" So is it matter of '?' in SQL query or I should specify bind parameter in different way? Regards Jakub Tuta

Re: [Catalyst] LEFT JOIN with AND statement

2009-03-24 Thread Jakub Tutaj
stash->{studentgrouptasks} = [$c->model('sapsDB::GroupTasksComplex')->search ( {}, { bind => [ $c->user->id,$groupId ] } ) ]; I hope that will help someone else too. Thanks Zbigniew for a hint! Regards! Jakub Tutaj -- View this message in context: http://www.nabbl

[Catalyst] LEFT JOIN with AND statement

2009-03-17 Thread Jakub Tutaj
tudentTasks', 'group_task_id'); saps::Schema::StudentTasks->belongs_to(grouptask => 'saps::Schema::GroupTasks', 'group_task_id'); Another question is, if I have proper query, how to distinct studenttasks.status and grouptasks.status using stashed 'studentgr

Re: [Catalyst] Catalyst / DBIx Class Relationship many_to_many problem

2009-02-02 Thread Jakub Tutaj
://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Manual/Cookbook.pod#Setting_quoting_for_the_generated_SQL. > > That works perfectly! A lot of thanks for fast support. Jakub Tutaj -- View this message in context: http://www.nabble.com/Catalyst---DBIx-Class-Relationship-many_to_many-pr

[Catalyst] Catalyst / DBIx Class Relationship many_to_many problem

2009-02-01 Thread Jakub Tutaj
ongs_to(user => 'saps::Schema::Users', 'user_id'); I already tried getting just simple data like user.name / course.name / course_user.user_id and it all works fine, but when FOREACH user = course.users error always occurs. Any help? R