这个 sql :
if($_POST['adat']){
mysql_query("UPDATE pages SET page_value = '0' WHERE user_id = '$_SESSION[user_id]' ");
foreach($_POST['page_ids'] as $page){
$pa = $page;
if ($pa){
mysql_query("UPDATE pages SET page_value = '1' WHERE user_id = '$_SESSION[user_id]' AND page_id = '$page' LIMIT 2 ");
}
}
}
I like, that When selected page, then if more page selected even just let it be two update? 我尝试order by user_id limit 2
,或者简单limit 2
,但这不起作用。