Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      WIndows 7
      Wamp (PHP Version 5.3.0 mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $ )

      Description

      I made a DQL delete query.

      $q = Doctrine_Query::create()
      ->delete()
      ->from('termRelationship tr')
      ->innerJoin('tr.termTaxonomy tt')
      ->innerJoin('tr.Post p')
      ->where('p.id = ?', '1')
      ->andWhere('tt.taxonomy = ?','category');

      //GENERATED SQL OF THE DQL
      DELETE FROM term_relationship INNER JOIN term_taxonomy t2 ON t.term_taxonomy_id = t2.id INNER JOIN post p ON t.object_id = p.id WHERE (id = '1' AND taxonomy = 'category')

      But this query is incorrect

      The query must be( alias are not present beetween DELETE and FROM and for the FROM table)

      DELETE tr FROM term_relationship tr INNER JOIN term_taxonomy t2 ON tr.term_taxonomy_id = t2.id INNER JOIN post p ON tr.object_id = p.id WHERE (p.id = '1' AND t2.taxonomy = 'category')

      With this request all is good in pphmyadmin.

        Activity

        jerome created issue -
        Jonathan H. Wage made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            jerome
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: