UNION parse error (and dynamic UNION)
I'm having trouble with a UNION.
Here is my code:
I keep getting a parse error - but can't figure out what it is. Any ideas?
$result = mysqli_query($link, 'SELECT * FROM table_1 WHERE MATCH(column) AGAINST('$keyword1*' IN BOOLEAN MODE)
SELECT * FROM table_2 WHERE MATCH(column) AGAINST('keyword2*' IN BOOLEAN MODE)';
As a second question - is it possible to build a dynamic UNION query? I think this would be optimal but I'm not sure that this is possible.
I ask because I will need to add one more AND clause to the query above from a set of checkboxes the user can submit with this form.
Thanks in advance - hope it is clear.