tableselect checkboxes
As beebee said on comments : 

$rows should be indexed like this :

foreach ($result as $res){

    $rows [$res -&gt; entity_id] = array(


and the condition of the publishing function :

function publishing_submit($form, &amp;$form_state){

    $check = array_filter($form_state['values']['table']);
    $sql = db_update('field_data_field_state');
    $sql-&gt;fields(array('field_state_value'=&gt; 'Published'));
    $sql-&gt;condition('entity_id', $check, 'IN');
    $sql-&gt;execute();
}


Thanx beebee