Insert multiple checkbox value from webform into table
It works if I replace these codes:

$selectedData=db_query("SELECT data FROM {webform_submitted_data} WHERE nid = :nid AND cid =:cid AND sid= :sid",array(':nid'=&gt;$accessnode, ':cid' =&gt; 1, 'sid'=&gt;$lastestSub))-&gt;fetchAll();


by this:

$selectedData=db_query("SELECT data FROM {webform_submitted_data} WHERE nid = :nid AND cid =:cid AND sid= :sid",array(':nid'=&gt;$accessnode, ':cid' =&gt; 1, 'sid'=&gt;$lastestSub))-&gt;fetchCol();