title: Retrieve the result of a scalar sql function in php
body: <p>I have a scalar sql function which returns integer value either 1 or 0 . It is working perfectly in sql server management studio. I am executing the function in php like below.</p>
  
  <pre><code>$getuserloginfo = mssql_query("SELECT dbo.prtl_checkforce_pwd($userID) AS result");
  </code></pre>
  
  <p>I need to get the value returned from the function .
  ie </p>
  
  <pre><code>if(getuserloginfo==1){ } like this.
  </code></pre>
  
  <p>But when I tried to check the <code>getuserloginfo</code>,it is showing <code>Resource id #79</code> rather than 1 or 0. If am wrong how to get the value of my function in php. </p>