[Resolvido] mysql select
tenho o seguinte select:
$sq = "select $this->table.id as mid, $this->table.$this->fDisp as display,(select count(*) from $this->table where $this->table.$this->fParent = mid group by $this->table.$this->fParent) as sub from $this->table where $this->table.$this->fParent = $parentId $ord";
obtenho a seguinte mensagem de erro: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as display, select count(*) from carros where carros.parent = mid group ' at line 1
uso a versão 5.1.36 do mysql.
não consigo, apesar de várias alterações testadas, contornar o problema.
Alguém pode ajudar-me ?
Discussão (2)
Carregando comentários...