[Dbix-class] Please Help

icydee dbix-class at iandocherty.com
Fri Apr 6 09:06:03 GMT 2007


This was covered in a post a few days ago by Jason Galea

__PACKAGE__->connection($dsn, $user, $pass, { quote_char => '`', 
name_sep => '.' });


Regards
Ian C. Docherty (icydee)

quqi xiao wrote:
> When I use dbix::class,I meet a problem.
> This is the structure of my table in MySQL
> create table test_table(
>     id int,
>     group int
> )
>  
> and I used dbix::class to create a package like this:
> __PACKAGE__->add_columns(qw/ id group/);
>  
> And When I use the add_to... to insert the record.An error happened.
> INSERT INTO(id,group)values(1,1).
> I copy this to my mysql tool and change it to:
> INSERT INTO(id,`group`)values(1,1)
> Everything will be ok.` is a transferred meaning sign in Mysql and 
> group is a key word in Mysql.
> Is there any *mechanism*  in DBIx::class to avoid this problem?Thank 
> you very much.Hope your reply.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/dbix-class@lists.rawmode.org/




More information about the Dbix-class mailing list