This question has already been answered:
Good day! there was a task to transfer a small project from php + mysql to iis 8 + mssql, buried in the wall with the following line:
while($myrow = mysql_fetch_assoc($result)) { if ($myrow['mesto'] != $ip_user) { $mesto = $myrow['mesto']; echo '<option value="'.$mesto.'">'.$mesto.'</option>'; }; }; Redid in
while($myrow = sqlsrv_fetch_array($result,SQLSRV_FETCH_ASSOC)) { if ($myrow['mesto'] != $ip_user) { $mesto = $myrow['mesto']; echo '<option value="'.$mesto.'">'.$mesto.'</option>'; }; }; But I get this error in the log:
sqlsrv_fetch_array () expects parameter 1 to be resource, boolean given in
in line
while($myrow = sqlsrv_fetch_array($result,SQLSRV_FETCH_ASSOC)) What am I doing wrong ?
$resultnot a resource, but false - rjhdby