$query = $_SGLOBAL['db']->query("SELECT bf.*, cl.classname, b.* FROM ".tname('blog')." b
LEFT JOIN ".tname('blogfield')." bf ON bf.blogid=b.blogid JOIN ".tname('class')." cl ON b.classid=cl.classid
WHERE b.uid in(1,4,7)");
$query = $_SGLOBAL['db']->query("SELECT bf.*, cl.classname, b.* FROM ".tname('blog')." b
LEFT JOIN ".tname('blogfield')." bf ON bf.blogid=b.blogid JOIN ".tname('class')." cl ON b.classid=cl.classid
WHERE b.uid in(1,4,7)");