WordPress – PHP MySQL – ik krijg maar 1 record te zien na een query uit de datab
-
WordPress – PHP MySQL –
ik krijg maar 1 record te zien na een query uit de database.
=== start code ===
[insert_php]
define( ‘ABSPATH’, dirname(__FILE__) . ‘/’ );
require_once( ABSPATH . ‘conSchutterij.php’);mysql_select_db($database_conSchutterij, $conSchutterij);
$query_rsDraaitabelRangVlak = “SELECT * FROM drtblVlakRang2014 ORDER BY GemSerie DESC”;
$rsDraaitabelRangVlak = mysql_query($query_rsDraaitabelRangVlak, $conSchutterij) or die(mysql_error());
$row_rsDraaitabelRangVlak = mysql_fetch_assoc($rsDraaitabelRangVlak);
$totalRows_rsDraaitabelRangVlak = mysql_num_rows($rsDraaitabelRangVlak);
[/insert_php]<h1>Overzicht op Rang 10m vlakschieten 2013-2014</h1>
<h3>Seizoen 2013-2014</h3>
<table border=”1″ cellspacing=”0″ cellpadding=”0″>
<tr>
<th scope=”col”>Naam</th>
<th scope=”col”>1e</th>
<th scope=”col”>2e</th>
<th scope=”col”>3e</th>
<th scope=”col”>4e</th>
<th scope=”col”>5e</th>
<th scope=”col”>6e</th>
<th scope=”col”>7e</th>
<th scope=”col”>8e</th>
<th scope=”col”>9e</th>
<th scope=”col”>10e</th>
<th scope=”col”>Avond</th>
<th scope=”col”>Score</th>
<th scope=”col”>Schoten</th>
<th scope=”col”>Gem/Pijl</th>
<th scope=”col”>Gem/Serie</th>
</tr>[insert_php]
do {
[/insert_php]
<tr>
<td width=”150″>[insert_php] echo $row_rsDraaitabelRangVlak[‘Naam’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘1e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘2e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘3e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘4e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘5e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘6e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘7e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘8e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[‘9e’]; [/insert_php]</td>
<td align=”center” width=”30″>[insert_php] echo $row_rsDraaitabelRangVlak[’10e’]; [/insert_php]</td>
<td align=”center” width=”55″>[insert_php] echo $row_rsDraaitabelRangVlak[‘Avond’]; [/insert_php]</td>
<td align=”center” width=”55″>[insert_php] echo $row_rsDraaitabelRangVlak[‘Score’]; [/insert_php]</td>
<td align=”center” width=”65″>[insert_php] echo $row_rsDraaitabelRangVlak[‘Schoten’]; [/insert_php]</td>
<td align=”center” width=”65″>[insert_php] echo sprintf(“%01.2f”, $row_rsDraaitabelRangVlak[‘GemPerPijl’]); [/insert_php]</td>
<td align=”center” width=”85″>[insert_php] echo sprintf(“%01.2f”, $row_rsDraaitabelRangVlak[‘GemSerie’]); [/insert_php]</td>
</tr>[insert_php]
} while ($row_rsDraaitabelRangVlak = mysql_fetch_assoc($rsDraaitabelRangVlak));
[/insert_php]</table>
[insert_php]
mysql_free_result($rsDraaitabelRangVlak);
[/insert_php]=== end code ===
Dezelfde code gebruik ik in mijn bestaande website, maar daar gebruik ik dan (<?php en ?>) in plaats van ([insert_php] en [/insert_php]). De query op mijn website laat 15 records records zien met dezelfde code.
Wat doen ik nu fout???
Alvast bedankt,
Fons
- Het onderwerp ‘WordPress – PHP MySQL – ik krijg maar 1 record te zien na een query uit de datab’ is gesloten voor nieuwe reacties.