[dancer-users] Only even items

Hugues Max huguesmax at gmail.com
Mon Apr 8 18:44:24 BST 2013


Hello
I've got stange problem with dancer with twitter boostrap
I use

use Dancer::Plugin::Database;
my $dbh = database({driver => 'mysql', database => 'asav'});
  my %allCommandeBNP = database->quick_select('CommandeBNP', {} );

my @allCommandeBNP= %allCommandeBNP;
my $allCommandeBNP=@allCommandeBNP;

In my mysql table has 36 items and $allCommandeBNP egal  36

I use

  if (params->{cmd} && params->{cmd} eq 'list') {
                  return template 'template/navbar_login' => {
                         username =>  params->{username},
                         password =>  params->{password},
                         tab      =>  3,
                         ccmd => \%allCommandeBNP,
                         show_list => "Liste des N° de commande:",
                 };
         }



and in my template

[%  FOREACH s IN ccmd.keys.sort %]
              [% ccmd.$s.Ckey %]-
         [%  END %]

the result is 18 items, one item on two and only even item

Liste des N° de commande: 210- 208- 206- 204- 202- 200- 198- 196- 194- 
192- 190- 188- 186- 182- 184- 212- 214- 216-

On mysql.log  with request log activated , request is SELECT * FROM 
`CommandeBNP`

if someone has a idea ?



More information about the dancer-users mailing list