On Thu, Oct 02, 2008 at 10:10:31AM -0400, Jesse Sheidlower wrote:
> On Thu, Oct 02, 2008 at 08:38:41AM +0200, Matthias Zeichmann wrote:
> > On Thu, Oct 2, 2008 at 04:14, Jesse Sheidlower <[EMAIL PROTECTED]> 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
> 
> Uh, yeah, that would be it.
> 
> OK, I feel stupid, but at least in a different way from how I
> thought I was being stupid ;-)

Stick { quote_char => '`' } in connect_info

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to