获得用户最新发布的文章


//获得用户最新发布文章

function getnametext($tuid){

$db = MySql::getInstance();

$sql = "SELECT * FROM ".DB_PREFIX."blog WHERE hide='n' and checked='y' and  author = ".$tuid." order by gid desc limit 5";

//die($sql);

$strs = $db->query($sql);

while($row = $db->fetch_array($strs)){

$list.= "

".subString($row['title'],0,30)."

";

}}

?>

你可能感兴趣的:(获得用户最新发布的文章)