<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Questions: Ambiguous Column when using *_match with left join and allowSearch CMSB 3.75</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Questions-Ambiguous-Column-when-using-_match-with-left-join-and-allowSearch-CMSB-3_75-82994</link>
        <description></description>
        <pubDate>Mon, 20 Apr 2026 12:31:25 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Questions-Ambiguous-Column-when-using-_match-with-left-join-and-allowSearch-CMSB-3_75-82994" rel="self" type="application/rss+xml" />

                <item>
          <title>Questions: Ambiguous Column when using *_match with left join and allowSearch CMSB 3.75</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2247844#post2247844</link>
          <description><![CDATA[<p>Hi Jeff, </p>
<p>Can you try this (untested) code? </p>
<pre class="language-php"><code>$query = "SELECT * FROM ::bios b
          LEFT JOIN ::locations l ON b.company = l.num
          WHERE b.category = :category
          ORDER BY b.num DESC
          LIMIT 1";
$results = DB::query($query, [
   ':category' =&gt; $_REQUEST['category_match'] ?? 0,
]);

showme($results);</code></pre>
<p>The :: inserts the table prefix.  Feel free to adjust or rename any fields as needed.</p>
<p>Let me know if it works for you or any questions.</p>

]]></description>
          <pubDate>Mon, 13 Jan 2025 23:23:39 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2247844#post2247844</guid>
        </item>
                <item>
          <title>Questions: Ambiguous Column when using *_match with left join and allowSearch CMSB 3.75</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2247836#post2247836</link>
          <description><![CDATA[<p>I was using getRecords.</p>
<pre class="language-php"><code>list($biosRecords, $biosMetaData) = getRecords(
    array(
        'tableName'   =&gt; "bios",
        'loadUploads' =&gt; true,
        'where'       =&gt; $where,
        'orderBy'     =&gt; $orderby,
        'allowSearch' =&gt; true,
        'perPage'     =&gt; 10,
        'leftJoin'    =&gt; array(
            'locations' =&gt; 'company'
        ),
        'limit'       =&gt; '1',
        'requireSearchMatch' =&gt; false,
        'debugSql'  =&gt; false,
    )
);</code></pre>
<p>I was using a query string of ?category_match=13. This seemed to work until CMSB 3.75. Both tables have a category column, which is where I got the ambiguous column name.</p>
<p>I found I could use bios_category_match, and it worked. However, I see the value gets set in the $_REQUEST to 'bios.category_match'. If this is submitted, it is changed. PHP replaces the dot with an underscore by default.</p>
<p>I am a bit confused on the proper way to use _match. </p>]]></description>
          <pubDate>Tue, 07 Jan 2025 16:21:06 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2247836#post2247836</guid>
        </item>
                <item>
          <title>Questions: Ambiguous Column when using *_match with left join and allowSearch CMSB 3.75</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2247835#post2247835</link>
          <description><![CDATA[<p>Hi Jeff, </p>
<p>If you can tell me the two table names, the column you want to join on, and what fields you want to search on, I can write some ZenDB code for you.</p>]]></description>
          <pubDate>Fri, 03 Jan 2025 18:34:10 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2247835#post2247835</guid>
        </item>
                <item>
          <title>Questions: Ambiguous Column when using *_match with left join and allowSearch CMSB 3.75</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2247834#post2247834</link>
          <description><![CDATA[<p>I have a left join with</p>
<pre class="language-php"><code>'allowSearch' = true</code></pre>
<p>and get an ambiguous column on _match.</p>
<p>I need to specify the table name in my query string, so I tried 'event.catefory_match=3'; however, $_GET and $_REQUEST both convert the dot to an underscore.</p>
<p>What syntax does ZenDB expect when trying to table qualify *_match?</p>]]></description>
          <pubDate>Fri, 03 Jan 2025 17:23:21 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2247834#post2247834</guid>
        </item>
              </channel>
    </rss>
  