I am using following php code to select a max value from a table in MS sql server database. This is just a snapshot of the code and not full code:
$sqlToCheckNID ="Select (?)=max(nid) from testRetailerlist";
$param_nid = array($maxNid,SQLSRV_PARAM_OUT);
$maxNidInDb = sqlsrv_query($conn,$sqlToCheckNID,$param_nid);
echo "<li>" .$maxNid. "<li>";
Its throwing me error as Undefined variable maxNid
I want to echo the value that i get from the select statement. I think I am using the wrong syntax but could not found any example on net.