How can you make a dynamic select an put them into dynamic variables. I don’t know if my expression is clear, but what I want to do is:
- select from table club
- put results in as many variables as there are results
- use results in html (for ex. I want to use only the first 32 clubs, there are only 32 clubs in the table)
My table clubs looks like this:
Club_id Club Poule
1 France A
2 Denmark A
3 Paraguay B
4 Senegal A
...
My select is: SELECT ploeg FROM club ORDER BY poule ASC
I know the results: clubs in the same poule are together in groups of 4 (1,2,3,4 – 5,6,7,8 – 9,10,11,12 - ...)
What I exactly want to do is make an table and fill in dynamicly the results, BUT they must be ordened like this:
Poule A Poule B
France Spain
Denmark Slovain
Urugay Paraguay
Senegal South-Africa
Poule C Poule D
...
What I want to do in the html is use the variables $v_club1 -> $v_club32 :
<html>
<body>
<table>
<tr><td>Poule A</td><td>Poule B</td></tr>
<tr><td>$v_club1</td><td>$v_club5</td></tr>
<tr><td>$v_club2</td><td>$v_club6</td></tr>
<tr><td>$v_club3</td><td>$v_club7</td></tr>
<tr><td>$v_club4</td><td>$v_club8</td></tr>
<tr><td>Poule C</td><td>Poule B</td></tr>
<tr><td>$v_club9</td><td>$v_club13</td></tr>
<tr><td>$v_club10</td><td>$v_club14</td></tr>
<tr><td>$v_club11</td><td>$v_club15</td></tr>
<tr><td>$v_club12</td><td>$v_club16</td></tr>
...
</table>
</body>
</html>
Can someone help me, plz? I’d really appreciate it!
Greetz,
Boogey Man
- select from table club
- put results in as many variables as there are results
- use results in html (for ex. I want to use only the first 32 clubs, there are only 32 clubs in the table)
My table clubs looks like this:
Club_id Club Poule
1 France A
2 Denmark A
3 Paraguay B
4 Senegal A
...
My select is: SELECT ploeg FROM club ORDER BY poule ASC
I know the results: clubs in the same poule are together in groups of 4 (1,2,3,4 – 5,6,7,8 – 9,10,11,12 - ...)
What I exactly want to do is make an table and fill in dynamicly the results, BUT they must be ordened like this:
Poule A Poule B
France Spain
Denmark Slovain
Urugay Paraguay
Senegal South-Africa
Poule C Poule D
...
What I want to do in the html is use the variables $v_club1 -> $v_club32 :
<html>
<body>
<table>
<tr><td>Poule A</td><td>Poule B</td></tr>
<tr><td>$v_club1</td><td>$v_club5</td></tr>
<tr><td>$v_club2</td><td>$v_club6</td></tr>
<tr><td>$v_club3</td><td>$v_club7</td></tr>
<tr><td>$v_club4</td><td>$v_club8</td></tr>
<tr><td>Poule C</td><td>Poule B</td></tr>
<tr><td>$v_club9</td><td>$v_club13</td></tr>
<tr><td>$v_club10</td><td>$v_club14</td></tr>
<tr><td>$v_club11</td><td>$v_club15</td></tr>
<tr><td>$v_club12</td><td>$v_club16</td></tr>
...
</table>
</body>
</html>
Can someone help me, plz? I’d really appreciate it!
Greetz,
Boogey Man