Précédent   Forum des professionnels en informatique > PHP > Bibliothèques et frameworks > symfony
symfony Forum d'entraide sur le framework PHP symfony. Avant de poster : cours symfony et FAQ symfony
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 03/01/2011, 18h39   #1
Membre du Club
 
Inscription : octobre 2004
Messages : 340
Détails du profil
Informations forums :
Inscription : octobre 2004
Messages : 340
Points : 53
Points : 53
Par défaut une valeur décimale

Bonjour,
j'utilse symfony 1.4.8 mon probleme est le suivant:
pour les valeurs decimales commencant par un zero tel que :il m'affiche comment resoudre ce probleme pour affiche le zero
pouvez vous m'aider svp


Cordialement,
nah_wah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/01/2011, 19h03   #2
Modérateur
 
Avatar de Michel Rotta
 
Homme Michel Rotta
Responsable d'exploitation informatique
Inscription : septembre 2005
Messages : 4 913
Détails du profil
Informations personnelles :
Nom : Homme Michel Rotta
Âge : 49
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Responsable d'exploitation informatique
Secteur : Distribution

Informations forums :
Inscription : septembre 2005
Messages : 4 913
Points : 7 505
Points : 7 505
Il faudrait plus d'informations.

Est-ce sur un champ, sur plusieurs ?

Comment est-il (sont-ils) déclarés dans le shema ?

Comment est-il (sont-ils) déclarés dans le form ?

Qu'est-ce qui arrive dans le html ?

Pour commencer.
__________________
Si tu donnes un poisson à un homme, il mangera un jour. Si tu lui apprends à pêcher, il mangera toujours (Lao Tseu).
  • Pensez à valoriser les réponses pertinantes, cliquez sur le bouton vert +1 pour indiquer votre accord avec la solution proposée.
  • Pensez à utiliser la balise [code] pour afficher du code, elle est cachée sous le bouton [#] dans l'éditeur.
  • Une discussion est terminée ? Alors le bouton est votre ami !
Michel Rotta est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/01/2011, 11h06   #3
Membre du Club
 
Inscription : octobre 2004
Messages : 340
Détails du profil
Informations forums :
Inscription : octobre 2004
Messages : 340
Points : 53
Points : 53
Bonjour,

ci-dessous la structure de ma classe le champ en question est :





Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
abstract class BaseNUANCE extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('NUANCE');
        $this->hasColumn('nu_nuance', 'string', 3, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 3,
             ));
        $this->hasColumn('nu_abrnom', 'string', 6, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 6,
             ));
        $this->hasColumn('nu_nom', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('nu_obsolet', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('nu_datobsol', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('nu_crittri', 'integer', 5, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 5,
             ));
        $this->hasColumn('nu_coeff', 'decimal', 3, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 3,
             ));
        $this->hasColumn('nu_coeff2', 'decimal', 3, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 3,
             ));
    }
 
    public function setUp()
    {
        parent::setUp();
        $this->hasMany('ECHANTILLON', array(
             'local' => 'nu_nuance',
             'foreign' => 'nu_nuance2'));
 
        $this->hasMany('ECHANTILLON as ECHANTILLON_18', array(
             'local' => 'nu_nuance',
             'foreign' => 'nu_nuance3'));
 
        $this->hasMany('ECHANTILLON as ECHANTILLON_19', array(
             'local' => 'nu_nuance',
             'foreign' => 'nu_nuance'));
 
        $this->hasMany('JUG_NUANCE', array(
             'local' => 'nu_nuance',
             'foreign' => 'nu_nuance'));
    }
}


Cordialement,
nah_wah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/01/2011, 16h56   #4
Modérateur
 
Avatar de Michel Rotta
 
Homme Michel Rotta
Responsable d'exploitation informatique
Inscription : septembre 2005
Messages : 4 913
Détails du profil
Informations personnelles :
Nom : Homme Michel Rotta
Âge : 49
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Responsable d'exploitation informatique
Secteur : Distribution

Informations forums :
Inscription : septembre 2005
Messages : 4 913
Points : 7 505
Points : 7 505
J'ai testé avec un champ défini à décimal dans le shema.

Génération des objets, de la table. Écran standard sans CSS sur ce champ. Valeur dans le fixature 0.77.

Valeur affichée 0,77

Tu dois avoir des spécificités dans ton application, ailleurs que ce que tu as montré.

Essaye de virer les truc "space" et les CSS pour commencer.
__________________
Si tu donnes un poisson à un homme, il mangera un jour. Si tu lui apprends à pêcher, il mangera toujours (Lao Tseu).
  • Pensez à valoriser les réponses pertinantes, cliquez sur le bouton vert +1 pour indiquer votre accord avec la solution proposée.
  • Pensez à utiliser la balise [code] pour afficher du code, elle est cachée sous le bouton [#] dans l'éditeur.
  • Une discussion est terminée ? Alors le bouton est votre ami !
Michel Rotta est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/01/2011, 18h00   #5
Membre du Club
 
Inscription : octobre 2004
Messages : 340
Détails du profil
Informations forums :
Inscription : octobre 2004
Messages : 340
Points : 53
Points : 53
Bonsoir,

pour le moment j ai trouvé une solution puisque ca revient à l'affichage donc j'ai employe number_format .
mais je vais voir du coté de ton avis et je te tiens au courant.

merci
Cordialement,
nah_wah est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 15h15.


 
 
 
 
Partenaires

Hébergement Web