Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  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.                       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement