如何删除表中的行

时间:2022-10-04 09:22:04

How can I delete a row in a table using PHP and MYSQL? with account_name, maintenance_type, ma_status, ma_contract_start, ma_contract_end, ma_reference_no

如何使用PHP和MYSQL删除表中的行? with account_name,maintenance_type,ma_status,ma_contract_start,ma_contract_end,ma_reference_no

3 个解决方案

#1


2  

DELETE FROM a_table WHERE account_name="someaccountname" AND maintenance_type="whatever"   etc...

#2


0  

it sounds like you looking for a tutorial here take a look at this

听起来你在这里寻找一个教程看看这个

http://w3schools.com/php/php_mysql_delete.asp

#3


0  

You can use it like this:

你可以像这样使用它:

<?php
$con = mysql_connect("localhost","username","password");
if (!$con) {
  die('Could not connect: ' . mysql_error());
}

mysql_select_db("my_db", $con);

mysql_query("DELETE FROM account_name WHERE SomeField='value'");

mysql_close($con);
?> 

#1


2  

DELETE FROM a_table WHERE account_name="someaccountname" AND maintenance_type="whatever"   etc...

#2


0  

it sounds like you looking for a tutorial here take a look at this

听起来你在这里寻找一个教程看看这个

http://w3schools.com/php/php_mysql_delete.asp

#3


0  

You can use it like this:

你可以像这样使用它:

<?php
$con = mysql_connect("localhost","username","password");
if (!$con) {
  die('Could not connect: ' . mysql_error());
}

mysql_select_db("my_db", $con);

mysql_query("DELETE FROM account_name WHERE SomeField='value'");

mysql_close($con);
?>