Jump to content
MakeWebGames

moving into houses


WarMad

Recommended Posts

hi im trying to make it were out of any ofthe houses either me or my spouse own we can move into but its not working it just lets us move into any house period weather we own it or not

 

 if(isset($_GET['in'])) {
      $db->query('SELECT `h`.*, `p`.*  FROM `houses` AS `h`
                  LEFT JOIN `properties` AS `p` ON `h`.`hID` = `p`.`pOWNER`
                  WHERE `hID` = ?');
      $db->execute([$_GET['in']]);
      $row = $db->fetch_row(true);
    if(!$db->fetch_row(true)){
    error('That house does not exist!');
     } else {
    if($row['pOWNER'] == !$ir['userid'] || $row['pOWNER'] == !$ir['relationship'] || $ir['married'] == 0){
       error('Either you and your spouse do not own that house, It does not exist, Or you guys are not married!');
     } 
    if($row['pOWNER'] = $ir['userid'] || $row['pOWNER'] = $ir['relationship'] && $ir['married'] == 1){
      $func->success('You have moved into the '.$row['hNAME'].'');
      $db->query('UPDATE `users` SET `will` = 0, `maxwill` = ? WHERE `userid` = ?');
      $db->execute([$row['hWILL'], $ir['userid']]);
     } 
     }

this is the code i have for it

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...