[Dbix-class] Prefetch problem

Matthias Zeichmann matthias.zeichmann at gmail.com
Thu Oct 2 07:38:41 BST 2008


On Thu, Oct 2, 2008 at 04:14, Jesse Sheidlower <jester at panix.com> wrote:
> SELECT me.id, me.title, me.performer_id, me.number, me.capo, me.tuning, me.tab_id, me.audio_id, me.group_id, performer.id, performer.name, group.id, group.name
> FROM lesson me
> JOIN performer performer ON ( performer.id = me.performer_id )
> JOIN lesson_group group ON ( group.id = me.group_id )
> WHERE ( ( me.id = 35 ) )
> ORDER BY me.title;
>
> This gives me the error:
>
> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON ( group.id = me.group_id )
> WHERE ( ( me.id = 35 ) )
> ORDER BY me.title' at line 4

try aliasing the table to grp instead of group, my guess is that group
is a reserved word

cheers m
-- 
siggen.pl: Segmentation Fault



More information about the DBIx-Class mailing list