IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

Lien entre deux tables


Sujet :

PHP & Base de données

  1. #1
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut Lien entre deux tables
    re bonjour, j'ai encore une question, comment faire un lien a partir de deux champs (ville et nom) qui sont dans ma table 1 et table 2
    sachant qu'il faut qu'il y a les deux champs similaire pour afficher la deuxieme table.
    voila ce que j'ai fait:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    if (isset($_GET["nom"]) && isset ($_GET["ville"])) $nom=$_GET["nom"].$ville=$_GET["ville"];
     
    $sql = ' SELECT DISTINCT telegestion_client.`nom` && telegestion_client.`ville` '
    . ' FROM telegestion_client'
    . ' JOIN complementaire'
    . ' ON telegestion_client.`nom` = complementaire.`nom` && telegestion_client.`ville` = complementaire.`ville` ';

  2. #2
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    $sql = ' SELECT DISTINCT telegestion_client.`nom`, telegestion_client.`ville` '

  3. #3
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    cela n'a pas resolu le probleme, cela ne prend pas en compte ville quand je test

  4. #4
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    ...
    . ' ON telegestion_client.`nom` = complementaire.`nom` && telegestion_client.`ville` = complementaire.`ville` '
    . " WHERE telegestion_client.`nom` = '".$nom."' AND telegestion_client.`ville` = '".$ville."' ";

  5. #5
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    tjs le meme probleme avec des erreurs supplémentaire:
    Notice: Undefined variable: nom in c:\program files\easyphp1-8\www\telegestion\affichage_detail_intervention.php on line 23

    Notice: Undefined variable: ville in c:\program files\easyphp1-8\www\telegestion\affichage_detail_intervention.php on line 23


    merci bcp MR N pour tout l'aide que vous m'apportez

  6. #6
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    if (isset($_GET["nom"]) && isset ($_GET["ville"])) {
       $nom=$_GET["nom"].$ville=$_GET["ville"]; 
    } else {
       $nom = '';
       $ville = '';
    }

  7. #7
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    je ne comprend pas on dirai que ca ne prend en compte que le champs nom pour la liaison, car je vous explique: j'ai plusieur ANPE dans des villes différentes et quand je clique sur le lien ANPE, cela devrai afficher que les infos de l'anpe correspondante, peut etre que j'ai mal fait le renvoi des champs ville et Nom sur mes liens???
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    $url = "affichage_detail_intervention.php?nom=nom";
     
    echo ("<td><h5> <a href=\"".$url."\">".$row["nom"]."</td>");

    cela renvoi que nom je me trompe pas? mais comment lui faire renvoyer ville en meme temps?

  8. #8
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    "affichage_detail_intervention.php?nom=nom&amp;ville=ville";

  9. #9
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    mon envoi des champs est il correct?
    $url = "affichage_detail_intervention.php?nom=nom";
    comment faire pour qu'il renvoi aussi un autre champs associer (ville)
    $url = "affichage_detail_intervention.php?nom=nom and ville=ville";
    comme ceci?

  10. #10
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Citation Envoyé par Mr N.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    "affichage_detail_intervention.php?nom=nom&amp;ville=ville";

  11. #11
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    100
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 100
    Points : 91
    Points
    91
    Par défaut
    Ca marche pas avec tout simplement un
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    $sql = ' 
               SELECT DISTINCT telegestion_client.`nom` , telegestion_client.`ville`  
               FROM telegestion_client, complementaire
               WHERE telegestion_client.`nom` = complementaire.`nom` AND telegestion_client.`ville` = complementaire.`ville` ';
    :

  12. #12
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    dsl d'avoir ecrit la question d'avant.
    J'ai tjs le meme probleme, je vait vous faire une explication plus simple:

    j'ai un fichier affichage client.php

    qui contient plusieur client avec les infos nom, villes...
    mais on peut avoir plusiseur fois le client dans les villes différentes.

    Un deuxieme fichier affiche les informations sur ces clients, il peut y avoir plusieur info sur celui ci mais pour trouver dans la base de donner, cela doit se faire par les champs nom et ville dans la base de donnée 2

    actuellement, cela fonctionne juste avec le champs nom

  13. #13
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    J'ai encore moins bien compris que sans l'exemple plus simple

  14. #14
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    la liaison semble finallement inexistante, que ce soit avec les nom ou avec les villes, je vous met les deux fichiers utiliser peut etre comprendrez vous mieux.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    <html>
     
    <head>
     
    <title>Detail_Intervention</title>
    <link href="css/style2.css" rel="stylesheet" type="text/css">
     
    </head>
     
    <body>
     
      <?php
        $connect=mysql_connect("localhost", "root", "") or die ("Echec de la connexion au serveur !");
        $select=mysql_select_db("telegestion_client");
     
     
    if (isset($_GET["nom"]) && isset ($_GET["ville"])) {
       $nom=$_GET["nom"].$ville=$_GET["ville"];
    } else {
       $nom = '';
       $ville = '';
    }
     
     
    $sql = ' SELECT DISTINCT telegestion_client.`nom` , telegestion_client.`ville` '
    . ' FROM telegestion_client'
    . ' JOIN complementaire'
    .  ' ON telegestion_client.`nom` = complementaire.`nom` && telegestion_client.`ville` = complementaire.`ville` '
    . " WHERE telegestion_client.`nom` = '".$nom."' AND telegestion_client.`ville` = '".$ville."' ";
     
    $query="select * from complementaire";
    if(isset($_GET["test"]))
      switch($_GET["test"])
        {
          case 1 : $query="select * from complementaire order by nom asc"; break;
          case 2 : $query="select * from complementaire order by nom desc"; break;
    case 3 : $query="select * from complementaire order by ville asc"; break;
          case 4 : $query="select * from complementaire order by ville desc"; break;
          case 5 : $query="select * from complementaire order by date asc"; break;
          case 6 : $query="select * from complementaire order by date desc"; break;
          case 7 : $query="select * from complementaire order by materiel asc"; break;
          case 8 : $query="select * from complementaire order by materiel desc"; break;
          case 9 : $query="select * from complementaire order by probleme asc"; break;
          case 10 : $query="select * from complementaire order by probleme desc"; break;
          case 11 : $query="select * from complementaire order by travaux asc"; break;
          case 12 : $query="select * from complementaire order by  travaux desc"; break;
          case 13 : $query="select * from complementaire order by technicien asc"; break;
          case 14 : $query="select * from complementaire order by technicien desc"; break;
          case 15 : $query="select * from complementaire order by nb_heures_intervention asc"; break;
          case 16 : $query="select * from complementaire order by nb_heures_intervention asc"; break;
     
     
        default : $query="select * from complementaire";
        }
     
        $result=mysql_query($query);
        $totenrege=mysql_num_rows($result);
     
       echo "<form action='affichage_detail_intervention.php' method='get' name='affichage_detail_intervention' enctype='multipart/form-data'>";
    echo "<form action='affichage_detail_intervention.php' method='get' name='affichage_detail_intervention' enctype='multipart/form-data'>"; 
     
    echo "<table width=100% border=1 align=center>";
        echo "<tr bgcolor='#000000'>";
     
     if ($totenrege==0)
          echo "<td colspan=9><h2>IL N'Y A PAS D'INFO DE CLIENTS</td>";
        else
        {echo "<td colspan=9><h2>IL Y A ".$totenrege." CLIENT(S)</td>";
          echo "</tr>";
          echo "<tr align=center bgcolor=#87CEEB>";
          echo "<td><b><h4 class='h41'>nom&nbsp;&nbsp;&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=1'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=2'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
    	  echo "<td><b><h4 class='h41'>ville&nbsp;&nbsp;&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=3'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=4'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";     
    echo "<td><b><h4 class='h41'>date&nbsp;&nbsp;&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=5'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=6'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";  
          echo "<td><b><h4 class='h41'>materiel&nbsp;&nbsp;&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=7'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=8'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>probleme&nbsp;&nbsp;&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=9'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=10'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>travaux&nbsp;&nbsp;&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=11'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=12'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>technicien&nbsp;&nbsp;&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=13'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=14'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>nb_heures_intervention&nbsp;&nbsp;&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=15'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='affichage_detail_intervention.php?test=16'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
     
          echo "</tr>";
        }
        echo "</form>";
     
        $i=0;
        while ($row=mysql_fetch_array($result))
        {
          if ($i==0)
          {
            echo "<tr bgcolor=#D3D3D3>";
            $i++;
          }
          else
          {
            echo "<tr bgcolor=#FFFFFF>";
            $i--;
          }
          echo "<td><h5>".$row["nom"]."</td>";
          echo "<td><h5>".$row["ville"]."</td>";
    echo "<td><h5>".$row["date"]."</td>";
          echo "<td><h5>".$row["materiel"]."</td>";
          echo "<td><h5>".$row["probleme"]."</td>";
          echo "<td><h5>".$row["travaux"]."</td>";
          echo "<td><h5>".$row["technicien"]."</td>";
          echo "<td><h5>".$row["nb_heures_intervention"]."</td>";
     
          echo "<tr>";
        }
        echo "</table>";
     echo "<br><br>";
          echo "<table width=50% align=center>";
          echo "<tr>";
     
     
          echo "</tr>";
    echo "</table>";
      ?>
     
    </body>
     
    </html>


    le deuxieme fichier :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
     
    <html>
     
    <head>
     
    <title>Lister</title>
    <link href="css/style2.css" rel="stylesheet" type="text/css">
     
    </head>
     
    <body>
    <form action='scripts/affichage_detail_intervention.php' method='post' name="affichage_detail_intervention" enctype="multipart/form-data">
     
      <?php
        $connect=mysql_connect("localhost", "root", "") or die ("Echec de la connexion au serveur !");
        $select=mysql_select_db("telegestion_Client");
     
        switch($_GET["test"])
        {
          case 1 : $query="select * from telegestion_client order by nom asc"; break;
          case 2 : $query="select * from telegestion_client order by nom desc"; break;
          case 3 : $query="select * from telegestion_client order by adresse asc"; break;
          case 4 : $query="select * from telegestion_client order by adresse desc"; break;
          case 5 : $query="select * from telegestion_client order by ville asc"; break;
          case 6 : $query="select * from telegestion_client order by ville desc"; break;
          case 7 : $query="select * from telegestion_client order by departement asc"; break;
          case 8 : $query="select * from telegestion_client order by departement desc"; break;
          case 9 : $query="select * from telegestion_client order by telsite asc"; break;
    case 10 : $query="select * from telegestion_client order by telsite desc"; break;
          case 11 : $query="select * from telegestion_client order by faxsite asc"; break;
    case 12 : $query="select * from telegestion_client order by faxsite desc"; break;
          case 13 : $query="select * from telegestion_client order by autocom asc"; break;
    case 14 : $query="select * from telegestion_client order by autocom desc"; break;
    case 15 : $query="select * from telegestion_client order by version asc"; break;
    case 16 : $query="select * from telegestion_client order by version desc"; break;
    case 17 : $query="select * from telegestion_client order by cpu asc"; break;
    case 18 : $query="select * from telegestion_client order by cpu desc"; break;
    case 19 : $query="select * from telegestion_client order by password_2 asc"; break;
    case 20 : $query="select * from telegestion_client order by password_2 desc"; break;
    case 21 : $query="select * from telegestion_client order by commentaire asc"; break;
    case 22 : $query="select * from telegestion_client order by commentaire desc"; break;
    case 23 : $query="select * from telegestion_client order by date_instal asc"; break;
    case 24 : $query="select * from telegestion_client order by date_instal desc"; break;
    case 25 : $query="select * from telegestion_client order by contrat asc"; break;
    case 26 : $query="select * from telegestion_client order by contrat desc"; break;
    case 25 : $query="select * from telegestion_client order by Commercial asc"; break;
    case 26 : $query="select * from telegestion_client order by Commercial desc"; break;
     
     
     
        default : $query="select * from telegestion_client";
        }
     
        $result=mysql_query($query);
        $totenreg=mysql_num_rows($result);
     
        echo "<form action='lister.php' method='get' name='lister' enctype='multipart/form-data'>";
        echo "<table width=100% border=1 align=center>";
        echo "<tr bgcolor='#000000'>";
        if ($totenreg==0)
          echo "<td colspan=9><h2>IL N'Y A PAS DE CLIENTS</td>";
        else
        {
          echo "<td colspan=9><h2>IL Y A ".$totenreg." CLIENT(S)</td>";
          echo "</tr>";
          echo "<tr align=center bgcolor=#87CEEB>";
          echo "<td><b><h4 class='h41'>nom&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=1'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=2'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
     
    echo "<td><b><h4 class='h41'>adresse&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=3'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=4'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";  
          echo "<td><b><h4 class='h41'>ville&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=5'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=6'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>departement&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=7'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=8'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>telsite&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=9'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=10'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>faxsite&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=11'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=12'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>autocom&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=13'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=14'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
          echo "<td><b><h4 class='h41'>version&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=15'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=16'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
    echo "<td><b><h4 class='h41'>cpu&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=17'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=18'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
    echo "<td><b><h4 class='h41'>password_2&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=19'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=20'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
    echo "<td><b><h4 class='h41'>commentaire&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=21'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=22'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
    echo "<td><b><h4 class='h41'>date_instal&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=23'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=24'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
    echo "<td><b><h4 class='h41'>contrat&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=25'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=26'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
    echo "<td><b><h4 class='h41'>Commercial&nbsp;&nbsp;&nbsp;&nbsp;<a href='lister.php?test=23'><img border=0 src='http://127.0.0.1/Telegestion/images/haut.gif'><a>&nbsp;&nbsp;<a href='lister.php?test=24'><img border=0 src='http://127.0.0.1/Telegestion/images/bas.gif'><a></b></td>";
     
          echo "</tr>";
        }
        echo "</form>";
     
        $i=0;
        while ($row=mysql_fetch_array($result))
        {
          if ($i==0)
          {
            echo "<tr bgcolor=#D3D3D3>";
            $i++;
          }
          else
          {
            echo "<tr bgcolor=#FFFFFF>";
            $i--;
          }
     
     
    $url = "affichage_detail_intervention.php?nom=nom";
     
    echo ("<td><h5> <a href=\"".$url."\">".$row["nom"]."</td>");
     
     
     
    echo "<td><h5>".$row["adresse"]."</td>";
     
     
    echo "<td><h5>".$row["ville"]."</td>";
          echo "<td><h5>".$row["departement"]."</td>";
          echo "<td><h5>".$row["telsite"]."</td>";
          echo "<td><h5>".$row["faxsite"]."</td>";
           echo "<td><h5>".$row["autocom"]."</td>";
           echo "<td><h5>".$row["version"]."</td>";
     echo "<td><h5>".$row["cpu"]."</td>";
     echo "<td><h5>".$row["password_2"]."</td>";
     echo "<td><h5>".$row["commentaire"]."</td>";
     echo "<td><h5>".$row["date_instal"]."</td>";
     echo "<td><h5>".$row["contrat"]."</td>";
     
     echo "<td><h5>".$row["Commercial"]."</td>";
     
     
    echo "<td><h5></td>";
     
            echo "<tr>";
     
          echo "<tr>";
        }
     
    echo "</table>";
          echo "<br><br>";
          echo "<table width=50% align=center>";
          echo "<tr>";
     
     
          echo "</tr>";
     
     
        echo "</table>";
     
      ?>
     
    </body>
     
    </html>

  15. #15
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    comprenez vous mieux???

  16. #16
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    100
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 100
    Points : 91
    Points
    91
    Par défaut
    Le code est long a lire...

    C'est normal le
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
       echo "<form action='affichage_detail_intervention.php' method='get' name='affichage_detail_intervention' enctype='multipart/form-data'>"; 
    echo "<form action='affichage_detail_intervention.php' method='get' name='affichage_detail_intervention' enctype='multipart/form-data'>";
    dans le premier fichier?

    Pourrais-tu mettre un appercu de tes tables et des champs présents dedans? (au moins ceux qui nous interessent)

  17. #17
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    comment inserer une image, je n'y arrive pas

  18. #18
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    100
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 100
    Points : 91
    Points
    91
    Par défaut
    pour insérer une image:


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <img src="chemin_de_l_image" name="nom_de_l_image" border=0>
    tu peux rajouter les attributs width et length pour la taille.

    Menfin "il dit qu'il voit pas le rapport" :

  19. #19
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Citation Envoyé par The Wretched
    Menfin "il dit qu'il voit pas le rapport" :
    Moi je dis qu'il bluffe.

  20. #20
    Membre à l'essai
    Inscrit en
    Mars 2005
    Messages
    73
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 73
    Points : 24
    Points
    24
    Par défaut
    je parlai de rajouter une image dans le forum pour que tu vois la forme de mes tables

Discussions similaires

  1. si pas de lien entre deux table
    Par acipeg dans le forum SAP Crystal Reports
    Réponses: 3
    Dernier message: 24/11/2006, 10h33
  2. [débutant] lien entre deux tables
    Par t-die dans le forum Débuter
    Réponses: 1
    Dernier message: 03/02/2006, 20h36
  3. lien entre deux table
    Par ept35 dans le forum Débuter
    Réponses: 28
    Dernier message: 21/12/2005, 14h50
  4. [MySQL] Lien entre deux tables
    Par ept35 dans le forum PHP & Base de données
    Réponses: 5
    Dernier message: 28/11/2005, 13h56
  5. [VB.NET] ComboBox lien entre deux tables
    Par VDB1 dans le forum Windows Forms
    Réponses: 3
    Dernier message: 15/07/2004, 12h15

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo