Ik wil een paar gegevens op halen met while uit mijn database. Maar hij haalt er maar een op. Terwijl er 2 in de database staan.
Code:
Wat heb ik hier fout??
Alvast bedankt!
Code:
[COLOR= #0000BB]<?php
$bsql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT id, manier, procent, bedrag FROM optie LIMIT 0,10"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bquery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bsql[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]bquery: [/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$bfetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bquery[/COLOR][COLOR= #007700]);[/COLOR]
?>
<table border="1px" cellspacing="0" cellpadding="4px;">
<tr>
<td>Betaal optie:</td>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$brij[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bquery[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<td>[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$brij[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]manier[/COLOR][COLOR= #007700]].[/COLOR] [COLOR= #DD0000]</td>[/COLOR][COLOR= #007700];
}[/COLOR] ?>
</tr>
</table> Wat heb ik hier fout??
Alvast bedankt!
??
