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
| <?php
//connection au serveur:
$connexion = mysql_connect( "localhost", "root", "" ) ;
//sélection de la base de données:
$db = mysql_select_db( "emb" ) ;
//requête SQL:
$client_sql = "SELECT IdEntrepriseRef, NomEntreprise, TexteClient, LogoEnt, categorie.LibelleCategorie FROM EntrepriseRef,Categorie where categorie.IdCategorie=EntrepriseRef.IdCategorie ORDER BY NomEntreprise" ;
//exécution de la requête:
$client_rs = mysql_query( $client_sql, $connexion ) or exit('Erreur : '.mysql_error());
//affichage des données:
echo '<table border="2px">';
while( $client = mysql_fetch_array( $client_rs ) )
{
echo '<tr>';
echo '<td>';
echo '<a href="modification2.php?IdEntrepriseRef='.$client['IdEntrepriseRef'].'">modifier</a>';
echo '</td><td>';
echo '<b>';
echo $client['NomEntreprise'];
echo '</td><td>';
echo '</b>';
echo $client['TexteClient'];
echo '</td><td>';
echo '<img src="'.$client['LogoEnt'] .'"></img>';
echo '</td><td>';
echo $client['LibelleCategorie'];
echo '</td></tr>';
}
echo'</table>';
?> |
Partager