我无法使$ firstname等于$ row ['Firstname']。与姓氏一样。
$locationsQuery='select Firstname, Lastname, from locations where
username=$username;
$results = sqlsrv_query( $conn, $locationsQuery, array($desiredusername));
while($row = sqlsrv_fetch_array($results))
{
$firstname = $row['Firstname'];
$lastname = $row['Lastname'];
}
答案 0 :(得分:-1)
在'
$locationsQuery
第一行末尾,您遗漏了;