最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php update数据更新简单实例
时间:2022-06-24 19:02:12 编辑:袖梨 来源:一聚教程网
sql update记录更新详细实例
语法:
[ WITH
UPDATE
[ TOP (expression) [ PERCENT ] ]
{ { table_alias |
[
实例 php教程
mysql教程_connect("mysql153.secureserver.net","java2s","password");
mysql_select_db("java2s");$query = "UPDATE Employee SET salary = '39.99' ";
$result = mysql_query($query);
echo "There were ".mysql_affected_rows()." product(s) affected. ";?>
利用update 更新数据
mysql_connect("mysql153.secureserver.net","java2s","password");
mysql_select_db("java2s");$rowID = "0001";
$name = "Kate";
$price = "12";$query = "UPDATE Employee SET name='$name', price='$price' WHERE ID='$rowID'";
$result = mysql_query($query);if ($result)
echo "The developer has been successfully updated.
";
else
echo "There was a problem updating the developer.
";
?>
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21