FAQ
Andy,
I was putting a simple little front end together for a database of keys (the
kind of keys that open a door) for a client.

catalyst.pl Keys
mv Keys keys
cd keys
script/keys_create.pl model DB DBIC 'dbi:mysql:keys' keys keys

Ran the create script using DBIC as the model helper, it failed to create for
the table named key.
I applied the following mod which made it work.

l0027:/opt/ewide # diff perl/DBIx/Class/Loader/mysql.pm
/usr/lib/perl5/site_perl/5.8.7/DBIx/Class/Loader/mysql.pm
86c86
< my $query = "DESCRIBE `$table`";
---
my $query = "DESCRIBE $table";
I dont have control over the table name and I assume that the word key in mysql
is a keyword.
Is this something that could make it into the next release?

thanks
Ben

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Search Discussions

  • Sebastian Riedel at Nov 16, 2005 at 9:57 am

    Am 16.11.2005 um 00:43 schrieb ben.norman@qmunity.net:

    Andy,
    I was putting a simple little front end together for a database of
    keys (the
    kind of keys that open a door) for a client.

    catalyst.pl Keys
    mv Keys keys
    cd keys
    script/keys_create.pl model DB DBIC 'dbi:mysql:keys' keys keys

    Ran the create script using DBIC as the model helper, it failed to
    create for
    the table named key.
    I applied the following mod which made it work.

    l0027:/opt/ewide # diff perl/DBIx/Class/Loader/mysql.pm
    /usr/lib/perl5/site_perl/5.8.7/DBIx/Class/Loader/mysql.pm
    86c86
    < my $query = "DESCRIBE `$table`";
    ---
    my $query = "DESCRIBE $table";
    Which mysql versions do accept a quoted table name?


    --
    sebastian
  • Ben Norman at Nov 16, 2005 at 10:47 am
    # mysql -V
    mysql Ver 14.7 Distrib 4.1.13, for suse-linux (i686) using readline 5.0

    The backticks dont help on line 52 when running the app where it says

    my $query = "SHOW TABLE STATUS FROM $dbname LIKE $table";

    thanks
    ben

    Sebastian Riedel wrote:
    Am 16.11.2005 um 00:43 schrieb ben.norman@qmunity.net:
    Andy,
    I was putting a simple little front end together for a database of
    keys (the
    kind of keys that open a door) for a client.

    catalyst.pl Keys
    mv Keys keys
    cd keys
    script/keys_create.pl model DB DBIC 'dbi:mysql:keys' keys keys

    Ran the create script using DBIC as the model helper, it failed to
    create for
    the table named key.
    I applied the following mod which made it work.

    l0027:/opt/ewide # diff perl/DBIx/Class/Loader/mysql.pm
    /usr/lib/perl5/site_perl/5.8.7/DBIx/Class/Loader/mysql.pm
    86c86
    < my $query = "DESCRIBE `$table`";
    ---
    my $query = "DESCRIBE $table";
    Which mysql versions do accept a quoted table name?


    --
    sebastian


    _______________________________________________
    Catalyst mailing list
    Catalyst@lists.rawmode.org
    http://lists.rawmode.org/mailman/listinfo/catalyst
  • Sebastian Riedel at Nov 16, 2005 at 11:03 am

    Am 16.11.2005 um 10:48 schrieb Ben Norman:

    # mysql -V
    mysql Ver 14.7 Distrib 4.1.13, for suse-linux (i686) using
    readline 5.0

    The backticks dont help on line 52 when running the app where it says

    my $query = "SHOW TABLE STATUS FROM $dbname LIKE $table";
    The current mysql loader was written for mysql 5.
    Would be nice to have a loader that works with both, 4 and 5.


    --
    sebastian

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedNov 16, '05 at 12:37a
activeNov 16, '05 at 11:03a
posts4
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Ben Norman: 2 posts Sebastian Riedel: 2 posts

People

Translate

site design / logo © 2021 Grokbase