dongshuobei1037 2015-03-22 06:56
浏览 22

根据行值删除特定日志

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);
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 msix packaging tool打包问题
    • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
    • ¥15 python的qt5界面
    • ¥15 无线电能传输系统MATLAB仿真问题
    • ¥50 如何用脚本实现输入法的热键设置
    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线