Re: [Dbix-class] New user with JOIN problem

2009-05-14 Thread Chris Cole
Matt S Trout wrote: On Wed, May 13, 2009 at 03:18:20PM +0100, Chris Cole wrote: Then we can make a start at helping you - currently your database is too broken. That's what's confusing me. How come the SQL works fine? MyISAM == broken, unless you -really- know what you're doing. No foreign

Re: [Dbix-class] New user with JOIN problem

2009-05-14 Thread Chris Cole
Matt S Trout wrote: On Wed, May 13, 2009 at 04:16:33PM +0100, Chris Cole wrote: Chris Cole wrote: David Ihnen wrote: Apologies. I used the DBIx::Class::Schema::Loader module to load the schema so I didn't have it explicitly. However, I got it to dump the schema to file. But I'm going to

Re: [Dbix-class] New user with JOIN problem

2009-05-14 Thread Chris Cole
Chris Cole wrote: Matt S Trout wrote: On Wed, May 13, 2009 at 03:18:20PM +0100, Chris Cole wrote: Then we can make a start at helping you - currently your database is too broken. That's what's confusing me. How come the SQL works fine? MyISAM == broken, unless you -really- know what you're

[Dbix-class] Getting a' count' value

2009-05-14 Thread Emmanuel Quevillon
Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc = $g-name(), num = $c-model('Table')-search({'id' = $g-id},CODE where I tried to replace

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Peter Rabbitson
Emmanuel Quevillon wrote: Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc = $g-name(), num = $c-model('Table')-search({'id' =

Re: [Dbix-class] Getting a 'count' value

2009-05-14 Thread Denny
On Thu, 2009-05-14 at 14:16 +0200, Emmanuel Quevillon wrote: I'd like to retrieve the value of a count returned by an SQL query. acc = $g-name(), num = $c-model('Table')-search({'id' = $g-id},CODE where I tried to replace CODE with : 1- )-all() 2- { select =[{'count' = '*'}],as =

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Emmanuel Quevillon
Peter Rabbitson wrote: Emmanuel Quevillon wrote: Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc = $g-name(), num =

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Chris Cole
Emmanuel Quevillon wrote: Peter Rabbitson wrote: Emmanuel Quevillon wrote: Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc =

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Emmanuel Quevillon
Emmanuel Quevillon wrote: Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc = $g-name(), num = $c-model('Table')-search({'id' =

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Moritz Onken
Am 14.05.2009 um 14:16 schrieb Emmanuel Quevillon: Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc = $g-name(), num =

Re: [Dbix-class] New user with JOIN problem

2009-05-14 Thread Matt S Trout
On Thu, May 14, 2009 at 09:21:55AM +0100, Chris Cole wrote: Chris Cole wrote: Matt S Trout wrote: On Wed, May 13, 2009 at 03:18:20PM +0100, Chris Cole wrote: Then we can make a start at helping you - currently your database is too broken. That's what's confusing me. How come the SQL

[Dbix-class] Problem with populate() and commits?

2009-05-14 Thread Chris Cole
Hi, Given this schema: package DB::Schema::Species; use strict; use warnings; use base 'DBIx::Class'; __PACKAGE__-load_components(Core); __PACKAGE__-table(species); __PACKAGE__-add_columns( species_id, { data_type = SMALLINT, default_value = undef, is_nullable = 0, size =

[Dbix-class] Getting all relations of a table

2009-05-14 Thread Renee Bäcker
Hi *, can I do something like this: package MySchema::Table; # ... __PACKAGE__-has_many( 'relationname' = ... ); --- use MySchema::Table; my @relations = MySchema::Table-get_relations; # 'relationname' - Renée -- Perl-Magazin: http://perl-magazin.de Perl-Nachrichten:

Re: [Dbix-class] dirty-flag on inflated columns

2009-05-14 Thread Marc Mims
* Matt S Trout dbix-cl...@trout.me.uk [090514 08:49]: On Wed, May 13, 2009 at 12:10:18PM -0700, Marc Mims wrote: Ok. So, now how to fix it? I need a unique filename to deflate to, but I only want to create it once. Rather than using the deflated value {_column_data}{$column}, I can