$query = "SELECT COUNT (*) AS spo FROM NAME_TABEL WHERE
BEFORE_OURCE_OBAT = '1' AND ROOM = 'ORCHID' AND MONTH (DATE) = '$ month' ";
$row = sqlsrv_query($conn, $query);
$data = sqlsrv_fetch_array($row);
$spo = $data['spo'];
?>
why an error appears after the program is run, please help ?
Warning: sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given in
C:\xampp\htdocs\siimut\name_tabel.php on line 140
radhika_3 0 Newbie Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
Dani 4,329 The Queen of DaniWeb Administrator Featured Poster Premium Member
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.