passing PHP variable to sql query in oci_parse
<p>I am passing a PHP varibale into a oracle sql query. but its not taking it properly giving me ORA errors like - invalid character. I tried escaping the varibale as \'$sid\', this makes error go, but the query doesnt return anything.
Is there a way to pass PHP variable to oracle query</p>

<pre><code>if(isset($_POST['action']))
{
   $sid = $_POST['action'];
   $stid = oci_parse($conn, 'SELECT emp from table emp='$sid'');
   oci_execute($stid);
}
</code></pre>

<p>I have removed to the database connection part for brevity. </p>