php mysql IN子句不使用CSV变量。 只有第一行受到影响

when i query the database using php my admin the following sql works

update invoice
set paid = 1, date_recieved = 0000-00-00, check_number = 00000
where invoice_number IN (110038,110035,110033)

i have a text box where a user enters numbers separated by a comma. this is submitted via post to the $invoice variable. when i run the following only the first row is affected. the code commented out is things that i tried but didn't work

if(isset($_POST["paymentbtn"])){
    $invoice = $_POST["invoice"];
    //$data = array($invoice);
    //$data = implode(",", $data);
    $date = $_POST["date"];
    $check = $_POST["checknumber"];
    //$invoice = mysql_real_escape_string($invoice);
    $sql = mysql_query("update invoice set paid = 1, date_recieved = '$date',     check_number = '$check'
where invoice_number IN ('$invoice')" )or die (mysql_error());
}

im probability missing something simple

p.s. it also works when i just enter one value so its not an invalid date or anything

Don't use ' ' for $invoice because when you use it is like '1,2,3' where it should either be like '1','2','3' or 1,2,3

I think your query should be as below

"update invoice set paid = 1, date_recieved = '$date', check_number = '$check' where invoice_number IN ($invoice)"