SQL更新:更新多行而不是单行

I am writing a code for MySQL to fetch the 1st row with status is "inactive" and make them "active", but whenever I tried to update the column and make it "active" my query updates multiple rows rather than the single row.

date_default_timezone_set('Asia/Kolkata'); 
$d = time ();
$date = date("Y-m-d", $d); 

$customer_id="1470831854";

$member_details="SELECT * FROM login_update WHERE customer_id ='$customer_id' AND status='inactive' ORDER BY id ASC LIMIT 1 ";
$member = mysql_query($member_details);
while($list = mysql_fetch_array($member)){
    $status = $list['status'];
    $id = (int)$list['id'];

}   
$date_update = "UPDATE login_update SET status='active' WHERE id = '$id'";
$enter_date = mysql_query($date_update);

I think your code should be change as follow

while($list = mysql_fetch_array($member)){
    $status = $list['status'];
    $customerId = (int)$list['customer_id'];

}   
$date_update = "UPDATE login_update SET status='active' WHERE id = '$customerId'";
$enter_date = mysql_query($date_update);

becasue if you get $list['id'] it is always return only 1 unique value from the database then update only one record. I assumed id is your primary key.