| @@ 208-211 (lines=4) @@ | ||
| 205 | // First, if rows returned, then display the results |
|
| 206 | if ($rs->recordCount() > 0) { |
|
| 207 | echo "<table>\n<tr>"; |
|
| 208 | foreach ($rs->fields as $k => $v) { |
|
| 209 | $finfo = $rs->fetchField($k); |
|
| 210 | echo '<th class="data">', $misc->printVal($finfo->name), '</th>'; |
|
| 211 | } |
|
| 212 | echo "</tr>\n"; |
|
| 213 | $i = 0; |
|
| 214 | while (!$rs->EOF) { |
|
| @@ 217-220 (lines=4) @@ | ||
| 214 | while (!$rs->EOF) { |
|
| 215 | $id = (($i % 2) == 0 ? '1' : '2'); |
|
| 216 | echo "<tr class=\"data{$id}\">\n"; |
|
| 217 | foreach ($rs->fields as $k => $v) { |
|
| 218 | $finfo = $rs->fetchField($k); |
|
| 219 | echo '<td style="white-space:nowrap;">', $misc->printVal($v, $finfo->type, ['null' => true]), '</td>'; |
|
| 220 | } |
|
| 221 | echo "</tr>\n"; |
|
| 222 | $rs->moveNext(); |
|
| 223 | $i++; |
|