Skip to content

Error in Joining tables #45

Description

@Xaruca

When you join two tables in "SQL SELECT & JOIN" field in Module editor automaticaly add "Order by Id" to the select, but if the two tables has the id field this produde this error when you try to see the view module:

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in order clause is ambiguous (SQL: SELECT cursos., teachers. FROM cursos, teachers WHERE cursos.id IS NOT NULL and cursos.teacher_id = teachers.id
ORDER BY id asc LIMIT 0 , 10 )

This case is because the table 'cursos' and 'teachers' has the id field, but I can't modifi the ORDER statement.

How can I resolve this ???

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions