Menu
Hey,
I have code like this on my site:
[code=php]$conn = sqlsrv_connect($serverName, $connectionInfo);
if($conn === false)
{
echo “Could not connect.n”;
die(print_r(sqlsrv_errors(), true));
}
$tsql = “SELECT fProductRefNum1
FROM fProducts”;
$stmt = sqlsrv_query($conn, $tsql);
if (!$stmt)
{
echo “Error in statement execution.n”;
die(print_r(sqlsrv_errors(), true));
}
I just want to know which is better (or how they differ):
[B]if (!$stmt)[B]if($stmt === false)
Which case should I use and how/why would it matter?
That’s it… thanks!