Announcement

Collapse
No announcement yet.

Query errors deleting projects.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Query errors deleting projects.

    On deleting projects, a few queries throw errors. We're using MySQL 4.0.24. An erroneous query:

    DELETE issuenote
    FROM pt_issuenote AS issuenote
    INNER JOIN pt_issue AS issue ON (issue.issueid = issuenote.issueid)
    WHERE issue.projectid = 16

    The error:

    ERROR 1066: Not unique table/alias: 'issuenote'

    Quite a few of the DELETE/INNER JOIN queries result in this kind of error. These tables have not been modified.

    Any ideas?

  • #2
    Answering my own question here a bit: apparently prior to MySQL 4.1, one had to use the full table name in the delete query, e.g.


    DELETE pt_issuenote
    FROM pt_issuenote AS issuenote
    INNER JOIN pt_issue AS issue ON (issue.issueid = issuenote.issueid)
    WHERE issue.projectid = 16

    Whereas from 4.1 on, the alias should be used.

    Odd, but a quick code change. Should upgrade the DB, though.

    Comment


    • #3
      I attached a patch for this here: http://www.vbulletin.com/forum/proje...?issueid=23024

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X