Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.3
-
Fix Version/s: None
-
Component/s: Native SQL
-
Labels:
Description
Example RawSQL:
$q = new Doctrine_RawSql(); $q->select('{k.*}') ->from('SHP_MANDANT_KATEGORIE k') ->addComponent('k', 'ShpMandantKategorie k') ->where( 'k.id_mandant=' . $this->getIdMandant() ) ->andWhere( 'k.id_parent=' . $this->getIdMandantkategorie() ) ->andWhere( 'k.aktiv=1' ) ->orderBy( 'k.sortorder' );
$q->count() generates:
SELECT COUNT(*) as num_results FROM (SELECT DISTINCT k.id_mandantkategorie FROM SHP_MANDANT_KATEGORIE k WHERE k.id_mandant=2 AND k.id_parent=1520 AND k.aktiv=1) as results
The illegal Part ist the "as results" at the end...
Hi,
will this ever be corrected?
I just came across the same bug in another project...