$emo = $datastore->get('smile_replacements');
foreach($emo['orig'] as $smile_reg){
preg_match_all($smile_reg,$post_message,$matches);
//echo "<pre>";
//var_dump($matches[0]);
if(isset($matches[0][0])){
$sql = "UPDATE " . BB_SMILIES . " SET hits = hits + ".count($matches[0])." WHERE code = '".$matches[0][0]."'";
DB()->sql_query($sql);
}
}