Commit a3d367b6 authored by Feu's avatar Feu

un grand coup de sqlrewriter

parent 513eb6e6
......@@ -107,15 +107,12 @@ class sqlrewriter
private function register_field($type,$nom)
{
echo "#$type:$nom<br/>";
$nom = trim(str_replace('`','',$nom));
$p = strpos($nom,'.');
if ( $p !== false )
{
$this->aliasfields[substr($nom,$p+1)] = array($type,$nom);
$this->fields[substr($nom,$p+1)] = array($type,$nom);
return;
}
$this->fields[$nom] = array($type,$nom);
......@@ -143,8 +140,6 @@ class sqlrewriter
if ( $pos1 !== false && $pos1 < $ppos )
$pos1 = strpos($this->select, '(', $ppos);
echo "$pos;$pos0;$pos1<br/>";
if ( $pos !== false && (( $pos1 !== false && $pos1 < $pos) || ($pos0 !== false && $pos0 < $pos) ) )
{
$type=1;
......
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