| Index
» Projekty
» phpMyEdit
» Fórum
» Heading Rows |
 |
Slobadog
Založený: 01.08.2005
Príspevky: 1
Zaslal: 2005-08-01 03:15
Návrat hore
Odpovedať s citátom
|
Thankyou so much for this marvellous class!
A nice feature I would like to be able to use is *heading rows* to group categories. I have written a very crude solution for my print page as follows with a loop within a loop:
$sql2 = "SELECT heading FROM details ORDER by 'heading'";
$result2 = mysql_query($sql2);
// Heading
while ($row2 = mysql_fetch_array($result2)) {
print("<tr><td class=\"titleBar\" colspan=\"7\">");
printf("%s</td></tr>\n", $row2["heading"]);
// Content
$lead = $row2["heading"];
$sql = "SELECT * from PRODUCTS where heading = '$lead'";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
print("<tr>");
printf("<td>%s", $row["power"], "</td>");
printf("<td>%s", $row["hours"], "</td>");
printf("<td>%s", $row["info"], "</td>");
printf("<td>%s", $row["fitting"], "</td>");
printf("<td>%s", $row["type"], "</td>");
printf("<td>%s", $row["brand"], "</td>");
printf("<td>%s", $row["price"], "</td>");
printf("</tr>\n");
}
}
It appears this approach is not viable within the pme class as the navigation buttons are printed in the same pass as the content.
Any thoughts and/or suggestions would be much appreciated.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|