$sql='SELECT postid, title, content FROM ^posts WHERE format="html" AND content LIKE "%/wysiwyg-editor/plugins/smiley/images/%" LIMIT 5';
$result=qa_db_query_sub($sql);
// prevent race conditions
$locks=array('posts','categories','users','users AS lastusers','userpoints','words','titlewords','contentwords','tagwords','words AS x','posttags','options');