Announcement

Collapse
No announcement yet.

[SOLVED] GRID: Displaying fields from 2 different tables in a grid

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

  • [SOLVED] GRID: Displaying fields from 2 different tables in a grid

    How can I display fields from 2 related tables in a grid in the same row?

  • #2
    SELECT c.id, c.field_customers, i.field_invoices FROM customers AS c
    LEFT JOIN invoices AS i ON i.id = c.id
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

    Comment


    • #3
      Thanks

      When I run the following SQL in Scriptcase I get an error for grid fields undefined. It runs ok in PHP Admin

      SELECT
      contact_project.contact_id,
      contact_project.project_id,
      contact_project.role_id,
      contact_project.datebegin,
      contact_project.dateend,
      contact.cell,
      contact.email,
      contact.title
      FROM
      contact_project LEFT JOIN contact ON contact_project.contact_id = contact.id
      WHERE
      project_id = '[v_project_id]'

      Comment


      • #4
        Originally posted by chersey View Post
        I get an error [...]
        The exakt error msg is?
        Best regards: - Reinhard -

        I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

        Comment


        • #5
          Thanks for the help. I got it. The error was because I had not added the fields to the grid. Works great!

          Comment

          Working...
          X