I have 3 tables where I want to search a result in both 3 tables. The problem is I just realize my MySql version 3, not allowed me to use UNION syntax. Is there any other way where I can get the result as same as UNION without using UNIon command??
Any help please..
union not allowed
Moderator: General Moderators
Thanks LM,
But then I don't really know the tree select query. Can you show me how. My 3 tables are products, specifications and companies. My query using UNION is:
$word_var = "% any_words %";
"SELECT id, name FROM specifications
WHERE name LIKE '" . $word_var . "'
OR description LIKE '" . $word_var . "'
UNION
SELECT id, name FROM products
WHERE name LIKE '" . $word_var . "'
OR overview LIKE '" . $word_var . "'
UNION
SELECT id, name FROM companies
WHERE name LIKE '" . $word_var . "'
OR info LIKE '" . $word_var . "'
OR address LIKE LIKE '" . $word_var . "' ";
Can you please convert that query into tree select query. Your help is really appreciated. Thank you
But then I don't really know the tree select query. Can you show me how. My 3 tables are products, specifications and companies. My query using UNION is:
$word_var = "% any_words %";
"SELECT id, name FROM specifications
WHERE name LIKE '" . $word_var . "'
OR description LIKE '" . $word_var . "'
UNION
SELECT id, name FROM products
WHERE name LIKE '" . $word_var . "'
OR overview LIKE '" . $word_var . "'
UNION
SELECT id, name FROM companies
WHERE name LIKE '" . $word_var . "'
OR info LIKE '" . $word_var . "'
OR address LIKE LIKE '" . $word_var . "' ";
Can you please convert that query into tree select query. Your help is really appreciated. Thank you