SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $query = "SELECT * FROM `insta` WHERE `postUrl` ='".$postUrl."'";
  2.                     if ($result = mysqli_query($mysqli,$query))
  3.                       {
  4.                        if(mysqli_num_rows($result) == 1)
  5.                         {
  6.                           $query3 = mysqli_query($mysqli, "UPDATE `insta` SET `instaLikes` = '".$instaLikes."', `updatedOn` = '".$datetime."' WHERE `postUrl` = '".$postUrl."')") or die(mysqli_error($mysqli));
  7.                           echo 'update <br />';
  8.                         }
  9.                       else
  10.                           $query2 = mysqli_query($mysqli, "INSERT INTO `insta` (`userid`, `username`, `description`, `postUrl`, `smallImage`, `fullImage`, `instaLikes`, `createdOn`, `addedOn`) VALUES ('".$userid."', '".$username."', '".$description."', '".$postUrl."', '".$smallImage."', '".$fullImage."', '".$instaLikes."', '".$datetime."', '".$date."')") or die(mysqli_error($mysqli));
  11.                           echo 'insert <br />';
  12.                       }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top