bonjour j'ai un dossier ou ils sont stockées des images , et j'ai une table dont un champs qui contient les nom images .
voila mon code d’affiche de la table avec le champs d'image
le champs image content le nom de l'image
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 $query = "SELECT * from equipements WHERE DEVICE_ID='TAL04' "; $result = mysql_query($query) or die (mysql_error()); $total = mysql_num_rows($result); // si on a récupéré un résultat on l'affiche. if($total) { while($row = mysql_fetch_array($result)) { echo '<table bgcolor="#FFFFFF">'; echo '<tr>'; echo '<td>'; echo '<table bgcolor="#FFFFFF">'."\n"; echo '<tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">DEVICE_ID</th>'; echo '<td>'.$row["DEVICE_ID"].'</td>'; echo '</tr>'."\n"; echo '<tr>'; echo '<th scope="row" bgcolor="#CCFF66">TOOL_DESCRIPTION</th>'; echo '<td>'.$row["TOOL_DESCRIPTION"].'</td>'; echo '</tr>'."\n"; echo '<tr>'; echo '<th scope="row" bgcolor="#CCFF66">TOOL_AREA</th>'; echo '<td>'.$row["TOOL_AREA"].'</td>'; echo '</tr>'."\n"; echo '<tr>'; echo '<th scope="row" bgcolor="#CCFF66">TOOL_LOCATION</th>'; echo '<td>'.$row["TOOL_LOCATION"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">TOOL_SUBLOCATION</th>'; echo '<td>'.$row["TOOL_SUBLOCATION"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">SERIAL_NUMBER</th>'; echo '<td>'.$row["SERIAL_NUMBER"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">BRAND</th>'; echo '<td>'.$row["BRAND"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">RECEPTION_DATE</th>'; echo '<td>'.$row["RECEPTION_DATE"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">BUY_OFF_DATE</th>'; echo '<td>'.$row["BUY_OFF_DATE"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">PROJECT_NUMBER</th>'; echo '<td>'.$row["PROJECT_NUMBER"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">MODEL</th>'; echo '<td>'.$row["MODEL"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">VOLTAGE</th>'; echo '<td>'.$row["VOLTAGE"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">AMPERAGE</th>'; echo '<td>'.$row["AMPERAGE"].'</td>'; echo '</tr>'."\n"; echo '<th scope="row" bgcolor="#CCFF66">POWER</th>'; echo '<td>'.$row["POWER"].'</td>'; echo '</tr>'."\n"; echo '</table>'."\n"; echo '</td>'; echo '<td>'; echo '<table bgcolor="#FFFFFF">'; echo '<tr>'; echo '<td>'<img src="./imagese/.$row["image"]."width="678" height="393" />'</td>'; echo '</tr>'; echo '</table>'; echo '</td>'; echo '</tr>'; echo '</table>'; } } else echo 'Pas d\'enregistrements dans cette table...'; // on libère le résultat mysql_free_result($result);
le probléme c'est que quand j'affiche la table , il m'affiche pas d'image
Partager