Straight forward question - but for the life of me, can't work out why below shows NO results!!
Was working - all I did was add the WHERE...
$query="select distinct c.id, c.FirstName, c.LastName, c.EmailAddress, c.MemberStatus from details c where c.MemberStatus = 'ACTIVE' order by c.LastName";
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);
$arr = array();
if($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$arr[] = $row;
}
}
# JSON-encode the response
$json_response = json_encode($arr);
// # Return the response
echo $json_response;
I have do doubt it's something ridiculously simple and I'll look like a goose...