public function insertIntoUserInfo($objUserInfo)
 {
     $objResult = new Result();
     $query = "INSERT INTO user_info(user_info_id, user_id, name, location, sex, age, contact) values(:USER_INFO_ID, :USER_ID, :NAME, :LOCATION, :SEX, :AGE, :CONTACT)";
     try {
         $dbconn = $this->getConnection();
         $stmt = $dbconn->prepare($query);
         $stmt->bindValue(':USER_INFO_ID', '');
         $stmt->bindValue(':USER_ID', $objUserInfo->getUserId());
         $stmt->bindValue(':NAME', $objUserInfo->getName());
         $stmt->bindValue(':LOCATION', $objUserInfo->getLocation());
         $stmt->bindValue(':SEX', $objUserInfo->getSex());
         $stmt->bindValue(':AGE', $objUserInfo->getAge());
         $stmt->bindValue(':CONTACT', $objUserInfo->getContact());
         $stmt->execute();
         $insertId = $dbconn->lastInsertId();
         if ($insertId) {
             $objResult->setResultType(Result::SUCCESS);
             $objResult->setResponse($insertId);
         } else {
             $objResult->setResultType(Result::FAILURE);
         }
     } catch (Exception $ex) {
         $this->throwPDOException($ex);
     }
     return $objResult;
 }
 public function saveUserCredentials($objUserDetails)
 {
     $objResult = new Result();
     try {
         $conn = $this->getConnection();
         $saveQuery = "INSERT INTO user_login(user_id, email, password) VALUES (:USER_ID, :EMAIL, :PASSWORD)";
         $q = $conn->prepare($saveQuery);
         $q->bindParam(":USER_ID", $objUserDetails->getUserId());
         $q->bindParam(":EMAIL", $objUserDetails->getEmail());
         $q->bindParam(":PASSWORD", $objUserDetails->getPassword());
         $q->execute();
         $insertId = $conn->lastInsertId();
         if ($insertId) {
             $objResult->setResponse($insertId);
             $objResult->setResultType(Result::SUCCESS);
         } else {
             $objResult->setResultType(Result::FAILURE);
         }
     } catch (PDOException $e) {
         echo 'exception ' . $e->getMessage();
         die;
     }
     return $objResult;
 }