WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

Database update involves deleting old data

Hammerfury4

New member

0

0%

Status

Offline

Posts

27

Likes

0

Rep

0

Bits

145

5

Months of Service

0%
Hello friends, I am updating the data I received from the server in the database. The codes I am using are as follows: $data = $data from the server; $conn = mysqli_connect("localhost", "root", "root", "test"); $query = "UPDATE records SET received_data='$data' WHERE user=1"; mysqli_query($conn, $query); mysqli_close($conn); Here, I am updating the data received from the server for user=1. If the received data matches that of another user, I want to delete the data of the other user. How can I achieve this? Thank you.
 

249

6,622

6,642

Top