Ik ben mijn site aan het omzetten van ASP naar PHP. In ASP bestaat er echter een methode rsTable.eof om te kijken of je op de laatste rij van je recordsset bent. Bestaat er ook zo'n methode in PHP?
Ik zit met volgend probleem: als ik op lijn 24 check of we al aan het einde van de geselecteerde data uit de database zijn, springt hij effectief over naar de volgende lijn/record. Terwijl ik dat daar niet wil.
Ookspronkelijk script: http://www.volh.be/root/trainingsuren.asp
Nieuw script (met fout): http://volh.tomsworld.be/root/trainingsuren.php
Ik zit met volgend probleem: als ik op lijn 24 check of we al aan het einde van de geselecteerde data uit de database zijn, springt hij effectief over naar de volgende lijn/record. Terwijl ik dat daar niet wil.
Ookspronkelijk script: http://www.volh.be/root/trainingsuren.asp
Nieuw script (met fout): http://volh.tomsworld.be/root/trainingsuren.php
PHP:
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
| <? $strType = $row["strGroepTypeNaam"]; do { ?> <tr> <td width="8%"></td> <td><u><? echo $row["strGroepNaam"] ?></u> <table width="100%" cellpadding="0" cellspacing="0" class="tabelTekst"> <? $strGroep = $row["strGroepNaam"]; do { ?> <tr> <td width="6%"></td> <td width="15%"><? echo $row["strDagNaam"] ?></td> <td width="20%"><? echo $row["strTrainingBeginuur"] ?> - <? echo $row["strTrainingEinduur"] ?></td> <td width="20%"><? echo $row["strTrainingPlaats"] ?></td> <td width="45%"><? echo $row["strTrainingOpmerking"] ?></td> </tr> <? $row = mysql_fetch_array($rsTable); if (!mysql_fetch_array($rsTable)) { $strTestGroep = "false"; } else { $strTestGroep = $row["strGroepNaam"]; } } while ($strGroep == $strTestGroep); ?> </table> </td> </tr> <? if (!mysql_fetch_array($rsTable)) { $strTestType = "false"; } else { $strTestType = $row["strGroepTypeNaam"]; } } while ($strType == $strTestType); ?> |
Greetz, OSwimmer