Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $query = "SELECT * FROM `insta` WHERE `postUrl` ='".$postUrl."'";
- if ($result = mysqli_query($mysqli,$query))
- {
- if(mysqli_num_rows($result) == 1)
- {
- $query3 = mysqli_query($mysqli, "UPDATE `insta` SET `instaLikes` = '".$instaLikes."', `updatedOn` = '".$datetime."' WHERE `postUrl` = '".$postUrl."')") or die(mysqli_error($mysqli));
- echo 'update <br />';
- }
- else
- $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));
- echo 'insert <br />';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement