if ($bbuserinfo['fieldXX']=="Yes") { $doposts = 'posts = posts,'; } else { $doposts = 'posts = posts + 1,'; }