$sql = "select seg_dtl_id from segmentation where seg_id = '1'"; $rs = $db->query($sql);