You should use mysql_affected_rows()
instead.
So that an you'll know that it made changes you want.
Obligatory note:
Please, don't use mysql_*
functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.
Here's what it will look like in using mysqli:
if(isset($_GET['id'])) {
$con = new mysqli('localhost', 'username', 'password', 'database_name');
$id = $_GET['id'];
$sql = 'UPDATE user SET age = 50 WHERE id = ?';
$update = $con->prepare($sql);
$update->bind_param('i', $id);
$update->execute();
if($update->affected_rows > 0) {
echo 'updated';
} else {
echo 'nothing';
}
}