Naast elke rij het zelfde div blok
Code (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?
$sql="SELECT * FROM aanbieders_details WHERE retentie >= '$getal1' AND retentie <= '$getal2' AND maand >= '$getal7' AND maand <= '$getal8' AND snelheid >= '$getal9' AND snelheid <= '$getal10'";
$result = mysql_query($sql);
echo mysql_error();
$numrows=mysql_num_rows($result);
if ($numrows == 0)
{
echo '<div class="spacer"></div>
There are no search results, please try again !
<div class="spacer"></div>';
}
else {
?>
<div class="compare_list">
<div class="compare_cell2">Provider</div>
<div class="compare_cell2">Package</div>
<div class="compare_cell2">Retention</div>
<div class="compare_cell2">Threads</div>
<div class="compare_cell2">Speed</div>
<div class="compare_cell2">SSL</div>
<div class="compare_cell2">Price per Month</div>
<div class="compare_cell2">Price per Quarter</div>
<div class="compare_cell2">Price per Half year</div>
<div class="compare_cell2">Price per Year</div>
<div class="compare_cell2">Account sharing</div>
<div class="compare_cell2">Average Score</div>
<div class="compare_cell2">Speed</div>
<div class="compare_cell2">Retention</div>
</div>
<?
while ($row = mysql_fetch_object($result)) {
$id = stripslashes($row->id);
$pakket = stripslashes($row->pakket);
$provider = stripslashes($row->provider);
$retentie = stripslashes($row->retentie);
$threads = stripslashes($row->threads);
$snelheid = stripslashes($row->snelheid);
$ssl = stripslashes($row->ssl);
$maand = stripslashes($row->maand);
$kwartaal = stripslashes($row->kwartaal);
$halfjaar = stripslashes($row->halfjaar);
$jaar = stripslashes($row->jaar);
$sharing = stripslashes($row->sharing);
echo '<div class="compare_list">';
echo '<div class="compare_cell">';
echo "$provider";
echo '</div><div class="compare_cell">';
echo "$pakket";
echo '</div><div class="compare_cell">';
echo "$retentie";
echo '</div><div class="compare_cell">';
echo "$threads";
echo '</div><div class="compare_cell">';
echo "$snelheid";
echo '</div><div class="compare_cell">';
echo "$ssl";
echo '</div><div class="compare_cell">';
echo "$maand";
echo '</div><div class="compare_cell">';
echo "$kwartaal";
echo '</div><div class="compare_cell">';
echo "$halfjaar";
echo '</div><div class="compare_cell">';
echo "$jaar";
echo '</div><div class="compare_cell">';
echo "$sharing";
echo '</div><div class="compare_cell">';
include ("score/average_search.php");
echo '</div><div class="compare_cell">';
include ("score/speed_search.php");
echo '</div><div class="compare_cell">';
include ("score/retention_search.php");
echo "</div>";
echo '</div>';
}
}
?>
$sql="SELECT * FROM aanbieders_details WHERE retentie >= '$getal1' AND retentie <= '$getal2' AND maand >= '$getal7' AND maand <= '$getal8' AND snelheid >= '$getal9' AND snelheid <= '$getal10'";
$result = mysql_query($sql);
echo mysql_error();
$numrows=mysql_num_rows($result);
if ($numrows == 0)
{
echo '<div class="spacer"></div>
There are no search results, please try again !
<div class="spacer"></div>';
}
else {
?>
<div class="compare_list">
<div class="compare_cell2">Provider</div>
<div class="compare_cell2">Package</div>
<div class="compare_cell2">Retention</div>
<div class="compare_cell2">Threads</div>
<div class="compare_cell2">Speed</div>
<div class="compare_cell2">SSL</div>
<div class="compare_cell2">Price per Month</div>
<div class="compare_cell2">Price per Quarter</div>
<div class="compare_cell2">Price per Half year</div>
<div class="compare_cell2">Price per Year</div>
<div class="compare_cell2">Account sharing</div>
<div class="compare_cell2">Average Score</div>
<div class="compare_cell2">Speed</div>
<div class="compare_cell2">Retention</div>
</div>
<?
while ($row = mysql_fetch_object($result)) {
$id = stripslashes($row->id);
$pakket = stripslashes($row->pakket);
$provider = stripslashes($row->provider);
$retentie = stripslashes($row->retentie);
$threads = stripslashes($row->threads);
$snelheid = stripslashes($row->snelheid);
$ssl = stripslashes($row->ssl);
$maand = stripslashes($row->maand);
$kwartaal = stripslashes($row->kwartaal);
$halfjaar = stripslashes($row->halfjaar);
$jaar = stripslashes($row->jaar);
$sharing = stripslashes($row->sharing);
echo '<div class="compare_list">';
echo '<div class="compare_cell">';
echo "$provider";
echo '</div><div class="compare_cell">';
echo "$pakket";
echo '</div><div class="compare_cell">';
echo "$retentie";
echo '</div><div class="compare_cell">';
echo "$threads";
echo '</div><div class="compare_cell">';
echo "$snelheid";
echo '</div><div class="compare_cell">';
echo "$ssl";
echo '</div><div class="compare_cell">';
echo "$maand";
echo '</div><div class="compare_cell">';
echo "$kwartaal";
echo '</div><div class="compare_cell">';
echo "$halfjaar";
echo '</div><div class="compare_cell">';
echo "$jaar";
echo '</div><div class="compare_cell">';
echo "$sharing";
echo '</div><div class="compare_cell">';
include ("score/average_search.php");
echo '</div><div class="compare_cell">';
include ("score/speed_search.php");
echo '</div><div class="compare_cell">';
include ("score/retention_search.php");
echo "</div>";
echo '</div>';
}
}
?>
Screenshot :
http://i51.tinypic.com/slibmd.jpg
1-3 aparte tabel
4-6 aparte tabel
7-9 aparte tabel
10-12 aparte tabel
13-15 aparte tabel
etc.
?
Toevoeging op 01/07/2011 14:04:04:
Is ondertussen gelukt ! Hieronder voor de liefhebber de oplossing :
Code (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
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
$i = 4;
$head = '
<div class="compare_list">
<div class="compare_cell2">Provider</div>
<div class="compare_cell2">Package</div>
<div class="compare_cell2">Retention</div>
<div class="compare_cell2">Threads</div>
<div class="compare_cell2">Speed</div>
<div class="compare_cell2">SSL</div>
<div class="compare_cell2">Price per Month</div>
<div class="compare_cell2">Price per Quarter</div>
<div class="compare_cell2">Price per Half year</div>
<div class="compare_cell2">Price per Year</div>
<div class="compare_cell2">Account sharing</div>
<div class="compare_cell2">Average Score</div>
<div class="compare_cell2">Speed</div>
<div class="compare_cell2">Retention</div>
</div>';
while ($row = mysql_fetch_object($result))
{
if($i % 4 == 0)
{
echo $head;
}
$i++;
$head = '
<div class="compare_list">
<div class="compare_cell2">Provider</div>
<div class="compare_cell2">Package</div>
<div class="compare_cell2">Retention</div>
<div class="compare_cell2">Threads</div>
<div class="compare_cell2">Speed</div>
<div class="compare_cell2">SSL</div>
<div class="compare_cell2">Price per Month</div>
<div class="compare_cell2">Price per Quarter</div>
<div class="compare_cell2">Price per Half year</div>
<div class="compare_cell2">Price per Year</div>
<div class="compare_cell2">Account sharing</div>
<div class="compare_cell2">Average Score</div>
<div class="compare_cell2">Speed</div>
<div class="compare_cell2">Retention</div>
</div>';
while ($row = mysql_fetch_object($result))
{
if($i % 4 == 0)
{
echo $head;
}
$i++;