<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Update Row Example</title>
<style type="text/css">
h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 36px;
font-weight: normal;
color: #FFFFFF;
}
.nText {
font-family: Tahoma, Geneva, sans-serif;
font-size: 14px;
font-weight: normal;
color: #000;
}
.eText {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
color: #666;
}
.oText {
font-family: Tahoma, Geneva, sans-serif;
font-size: 16px;
font-weight: normal;
color: #03C;
}
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50" align="center" bgcolor="#FD3E27"><h1>Update Row Example</h1></td>
</tr>
</table>
<p class="nText">This example shows you to update data of table.</p>
<p class="eText">Following is the output of current example:</p>
<p><span class="oText">
<?php
include("class.php");
$update["field_1"] = "Item1";
$condition["field_2"]["eq"] = "Item2";
mysql_update_row("table_name_1", $update ,$condition);
?>
</span></p>
</body>
</html>
|