How to run sql multi line queries in php? : <p>I want to run the following sql code in php and store the result in a variable:</p>

<pre><code>declare @d1 datetime, @d2 datetime
select @d1 = '9/9/2011',  @d2 = '9/18/2011'

select datediff(dd, @d1, @d2) - (datediff(wk, @d1, @d2) * 2) -
   case when datepart(dw, @d1) = 1 then 1 else 0 end +
   case when datepart(dw, @d2) = 1 then 1 else 0 end
</code></pre>

<p>Any help would be appreciated. Thanks!</p>
