PHP concat a word to mysql query
<p>I have a query</p>

<pre><code>"select * from test";
</code></pre>

<p>I have to add UNION after test</p>

<pre><code>"select * from test union"
</code></pre>

<p>It is not concat.</p>

<p>How do I add union to the query?</p>

<p><strong>update</strong></p>

<pre><code>select * from x where id = "2" union select * from y where id = "2" union select * from z where id = "2"
select * from x where id = "3" union select * from y where id = "3" union select * from z where id = "3"
</code></pre>

<p>See select statement id = 3 ,union is missing. Now,i've to add this union in the query to execute and remove last extra union and pass the query to mysql_query() function.</p>
