Commit 75a0a8c0 authored by Feu's avatar Feu

un grand coup de sqlrewriter

parent 875d19df
......@@ -476,7 +476,7 @@ class sqltable2 extends stdcontents
header("Content-Type: text/html; charset=utf-8");
if ( $rewrited )
echo "<tr><td>$rewrited</td></tr>";
echo "<tr><td colspan=\"".count($this->columns)."\">$rewrited</td></tr>";
echo $this->html_render(true);
exit();
}
......
......@@ -184,13 +184,15 @@ class sqlrewriter
if ( count($this->fields) == 0 )
$this->extract_fields();
print_r($this->fields);
if ( !isset($this->fields[$nom]) )
return false;
if ( empty($this->orderby) )
$this->orderby = 'ORDER BY '.$nom.' '.$o.' ';
else
$this->orderby = ', '.$nom.' '.$o.' ';
$this->orderby .= ', '.$nom.' '.$o.' ';
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment