This is for a client administration web-panel. So my structure looks like this: Table : Clipboard Row : Machine Name Row : Window Title Row : Clipboard Text Row : Machine Time Row : IP Address
I make a connection in php like this
include ('config.php');
$table = "Clipboard";
$conn = mysqli_connect($mysql_host, $mysql_user, $mysql_password,$mysql_database);
I need to be able to delete entries into my database depending on what "Machine it is". So if the machine name is "Ben" I need every entry by "Ben" to be deleted. So if Machine Name = Ben I need all the corresponding rows to that entry to be deleted.
What is the quickest and most efficient way of doing this?
include ('config.php');
$connection = mysql_connect($mysql_host, $mysql_user, $mysql_password);
$db = mysql_select_db($mysql_database, $connection);
$machinename = $_POST['machinename'];
$safemachinename = mysql_real_escape_string($machinename);
$query = mysql_query("delete from Notification where machinename=$safemachinename", $connection);