php update数据更新简单实例_PHP教程
语法:
[ 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.
";
?>
推荐阅读
-
php update数据更新简单实例_PHP教程
-
基于PHP的简单采集数据入库程序实例详解
-
php基于jquery的ajax技术传递json数据简单实例
-
PHP的Yii框架中使用数据库的配置和SQL操作实例教程
-
PHP SPL标准库之数据结构堆(SplHeap)简单使用实例
-
PHP 数据结构队列(SplQueue)和优先队列(SplPriorityQueue)简单使用实例
-
PHP数据流应用的一个简单实例
-
PHP面向对象的使用教程 简单数据库连接
-
PHP SPL标准库之数据结构堆(SplHeap)简单使用实例
-
PHP 数据结构队列(SplQueue)和优先队列(SplPriorityQueue)简单使用实例