Hi I am currently developing a php script that will simply return the value of one field. The code below is what ive been using
$code = $_POST['code'];
$serverName = "EDIT";
$connectionInfo = array("UID" => "EDIT", "PWD" => "EDIT", "Database"=>"EDIT");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
$tsql2 = "SELECT paitentno FROM paraappreg WHERE appno = $code";
$result2 = sqlsrv_query( $conn, $tsql2, array(), array( "Scrollable" => SQLSRV_CURSOR_KEYSET ));
print sqlsrv_fetch($result2);
This code is generating an output it is however always " 1 ". Im gussing this has something to do with how I am returning the value with sqlsrv_fetch however I am not sure what I should be using if this is the problem.
Thanks for any help givin :)