I have following code to update mysql table, But this is not working.
$conn = mysql_connect("localhost", "golrm", "tatatata") or die("Failure to communicate with database");
mysql_select_db("golrm", $conn) or die("Failure to select db");
$query = "Update Article Set Count1 = 2 where Number = 5";
$result_id = mysql_query($query, $conn) or die("Failure to get result");
$affrows = mysql_affected_rows($conn);
if ($affrows == 0)
echo "Record not updated" . mysql_errno() . mysql_error();
This is displaying message of last line "Record not updated" and value of $affrows is ZERO
Can some help me ?
Thanks.
$conn = mysql_connect("localhost", "golrm", "tatatata") or die("Failure to communicate with database");
mysql_select_db("golrm", $conn) or die("Failure to select db");
$query = "Update Article Set Count1 = 2 where Number = 5";
$result_id = mysql_query($query, $conn) or die("Failure to get result");
$affrows = mysql_affected_rows($conn);
if ($affrows == 0)
echo "Record not updated" . mysql_errno() . mysql_error();
This is displaying message of last line "Record not updated" and value of $affrows is ZERO
Can some help me ?
Thanks.