Hello everyone, here is a piece of code in which the following should occur: the file name (current) is checked and its name is stored in the variable Fname, then a query is made in the database in which you need to pull out the value of a specific cell in the line, orienting to the cell in the same line under name Pname which contains what is stored in the variable Pname
$query= "SELECT Ptittle FROM dbo.Pcontent WHERE Pname='$Fname'"; $result = sqlsrv_query ($conn,$query); $myrow = sqlsrv_fetch_array ($result); echo $myrow; ?> when working out the script, such an error occurs:
PHP Warning: sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given in C:\inetpub\wwwroot\technet\mopr.php on line 25 line 25:
$myrow = sqlsrv_fetch_array ($result);