I am using select query using Zend 2 like below.
I need to check if the above result returned NULL (ie) if the Email column is NULL).
$checkEmailId = "Select EmailId from UsersNew where HashedUid='".$newUserId."'";
$Emailquery = $this->getUsersNewTable()->checkEmailnull($checkEmailId);
if(Email is Null)
{
//EMail null
}
else{
//EMail not null
}
Model file:
public function checkEmailnull($sql){
$data = $this->tableGateway->getAdapter()->driver->getConnection()->execute($sql);
return $data;
}