<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Showing records from 2 tables</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Showing-records-from-2-tables-78836</link>
        <description></description>
        <pubDate>Wed, 20 May 2026 03:15:21 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Showing-records-from-2-tables-78836" rel="self" type="application/rss+xml" />

                <item>
          <title>Showing records from 2 tables</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2231099#post2231099</link>
          <description><![CDATA[<p>Hi jjem,</p>
<p>I think I have a solution to your problem. You need to change your list field in the works table to use  'Get options from MySQL query (advanced)' type. Then you'll need to create a MySQL statement that will retrieve values from the creations and performers table and combine them into one value. It should look something like this:</p>
<p><code>SELECT c.num, CONCAT(c.title, ' ', (SELECT p.first_name FROM &lt;?php echo $TABLE_PREFIX ?&gt;performers p WHERE p.num = c.performer))<br />  FROM `&lt;?php echo $TABLE_PREFIX ?&gt;creations` c</code></p>
<p>This is just example code, so you will have to make a few changes to get it working.</p>
<p>So this statement selects num values from the creations table as well as the associated title combined with a second select statement from the performers table. The MySQL CONCAT function is used to combine multiple strings into one string. The MySQL select statement for the performers table will return a string with the performers first name, using the num value stored in the performer field in the creations table.</p>
<p>Let me know if you have any questions.</p>
<p>Thanks!</p>
<p>Greg</p>]]></description>
          <pubDate>Tue, 02 Jul 2013 10:44:16 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2231099#post2231099</guid>
        </item>
                <item>
          <title>Showing records from 2 tables</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2231093#post2231093</link>
          <description><![CDATA[<p>Hi,</p>
<p>I will try to make this clearer, sorry.</p>
<p>I first enter the first_name and the name of the performers in the "performers" table.</p>
<p>In the "Creations" table, I enter date, venue, etc. and I can then choose a performer in a list (multi check list) that comes from the "perfoermers" table.</p>
<p>I then create a work in the "works" table, where I can associate a creation to it (drawn from the "creations" table). In that multi check field I was able to show the date and city but the performer is shown only by its "num" and not first_name, name. See attached file.</p>
<p>In clear;)</p>
<p>I am trying to associate a creation that has one or more performers to a work.</p>

]]></description>
          <pubDate>Mon, 01 Jul 2013 08:39:44 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2231093#post2231093</guid>
        </item>
                <item>
          <title>Showing records from 2 tables</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2231071#post2231071</link>
          <description><![CDATA[<p>Hi,</p>

<p>To help us clarify exactly what you are looking for, are  you trying to associate a work with a creation, just using performer names as a label, or are you trying to associate a work with a perform that has a creation?</p>

<p>Let me know and we'll see about designing a solution for you.</p>

<p>Thanks!</p>]]></description>
          <pubDate>Mon, 24 Jun 2013 10:51:05 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2231071#post2231071</guid>
        </item>
                <item>
          <title>Showing records from 2 tables</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2231041#post2231041</link>
          <description><![CDATA[<p>Hello,</p>
<p>This doesn't concern the front end but only cmsAdmin.</p>
<p>I have 3 tables:</p>
<p>"works", "creations", "performers".</p>
<p>in the "creations" table, I have a list fields where I can select "performers" (by first_name and name).</p>
<p>in the "works" table, I would like to be able to select from a list that comes from the "creations" table.</p>
<p>it works but I'd like to show the "performers"  first_name, and  name. For now it only shows  "num" field, which doesn't help.</p>
<p>Thanks for your help</p>]]></description>
          <pubDate>Fri, 21 Jun 2013 06:16:42 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2231041#post2231041</guid>
        </item>
              </channel>
    </rss>
  