$count = 0;
while ($row = $st->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT)) {
- $count ++;
+ $count++;
+ $count_fields = 0;
foreach ($this->fields() as $f => $spec) {
if (!$spec['extra']) {
if ($escape) $row[$f] = htmlspecialchars($row[$f]);
}
+
if ($this->db->type == 'sqlite' and preg_match('/^float\((?:\d+,)?(\d+)\)/',$spec['type'],$m)) {
$row[$f] = sprintf('%.'.$m[1].'f',$row[$f]);
}
+
+ if ($count_fields === 0) {
+ #$row[$f] = '<a href="'.$count_fields.'">' . $row[$f] . '</a>';
+ }
+
+ $count_fields++;
/* only if in latin1
if ($_REQUEST['format'] == 'csv') {
$row[$f] = utf8_encode($row[$f]);
}
+ #if ($format == 'table') array_unshift($row,'EDIT');
echo $this->{"rows_rec_$format"}($row);
}
$html = '<table class="'.$this->name.' rows border">'.PHP_EOL;
$html .= '<tr class="'.$this->name.' row bold">';
+ #$html .= '<th class="EDIT"></th>';
foreach (array_keys($this->fields()) as $f) {
$html .= '<th class="'.$f.'">'.$this->url_sort($f).'</th>';
}