Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does my MySQL MATCH() AGAINST() query fail with columns from LEFT JOIN'd databases?
    text
    copied!<p>I've got a MySQL query somewhat like the following:</p> <pre><code>SELECT * FROM products LEFT JOIN descriptions ON products.DescriptionID = descriptions.ID WHERE MATCH (name, overview, specs) AGAINST ('ram'); </code></pre> <p>All columns I'm trying to search with <code>MATCH() AGAINST()</code> are FULLTEXT, but I get the following error when testing in phpMyAdmin:</p> <pre><code>#1210 - Incorrect arguments to MATCH </code></pre> <p>If I only <code>MATCH</code> one column it doesn't error and works correctly, but as soon as I try to <code>MATCH</code> multiple columns it fails with this error. I'm running MySQL 5.0.45 and the <a href="http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html" rel="nofollow noreferrer">MySQL 5.0 Full-Text Search Functions</a> documentation implies I can do this.</p> <p>Is it because of the <code>LEFT JOIN</code>? Do I need to <code>OR</code> together a bunch of <code>MATCH() AGAINST()</code> function calls?</p> <p><strong>Update @Zak:</strong> I can't post the table creation statements, but I can say that in this example the columns are as follows: <code>products.name</code>, <code>descriptions.overview</code>, <code>descriptions.specs</code>. If I specify them in full <code>table.column</code> format, it doesn't change the behavior.</p> <p>However, if I lose <code>products.name</code> from the <code>MATCH()</code> I get the following error:</p> <pre><code>#1191 - Can't find FULLTEXT index matching the column list </code></pre> <p>But, both <code>descriptions.overview</code> and <code>descriptions.specs</code> are FULLTEXT.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload