korzystam z gotowca pobranego z http://www.datatables.net/ . W pliku new2.php mam fragment w ktorym wycagam dane z bazy. Zapytanie wykonuje sie, pętla wykonuje się tyle razy ile jest zwróconych rekordów ale danych w tabeli nie widać.
Kod
<?php
include('index.php');
include "databaseconfig15.php";
//$_SESSION["user_level"]!=1;
//$polaczenie=true;
$zapytanie= 'SELECT Numer, Id, Ilosc, Miara FROM Tabela_1 where Numer in (select Numer from Tabela_2 where Kod = "00-210" and Status = "2")';
$wynik = mysql_query($zapytanie) or die(mysql_error());
?>
<p></p>
<div>
<table id="datatables">
<thead>
<tr>
<th>Numer</th>
<th>Data</th>
<th>Ilosc</th>
<th>Miara</th>
</tr>
</thead>
<tbody>
<?php
while ($rekord = mysql_fetch_assoc($wynik)){
?>
<tr>
<td><?=$rekord['Numer']?></td>
<td><?=$rekord['Id']?></td>
<td><a>xy </a></td>
<td><?=$rekord['Ilosc']?></td>
<td><?=$rekord['Miara']?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</body>
</html>
include('index.php');
include "databaseconfig15.php";
//$_SESSION["user_level"]!=1;
//$polaczenie=true;
$zapytanie= 'SELECT Numer, Id, Ilosc, Miara FROM Tabela_1 where Numer in (select Numer from Tabela_2 where Kod = "00-210" and Status = "2")';
$wynik = mysql_query($zapytanie) or die(mysql_error());
?>
<p></p>
<div>
<table id="datatables">
<thead>
<tr>
<th>Numer</th>
<th>Data</th>
<th>Ilosc</th>
<th>Miara</th>
</tr>
</thead>
<tbody>
<?php
while ($rekord = mysql_fetch_assoc($wynik)){
?>
<tr>
<td><?=$rekord['Numer']?></td>
<td><?=$rekord['Id']?></td>
<td><a>xy </a></td>
<td><?=$rekord['Ilosc']?></td>
<td><?=$rekord['Miara']?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</body>
</html>
Zero błędów. Wynik ja poniżej. Tabela z pustymi wierszami a pod nią: Showing 1 to 10 of 217 entries.
Co robię źle?
Z góry dzięuje za pomoc, pozdrawiam
B