I'm stuck with this query as it isn't returning any information at all from the database, what have I done wrong? Mostly just need to know why the current function isn't returning anything.
public $perpage = 10; // Uploads perpage
PUBLIC FUNCTION Updates( $uiD, $lastid ){
    $data = "";
    $morequery = "";
        if( $lastid )
            $morequery = "AND M.post_iD < '".$lastid."' "; // More Button End
            $sth = $this->db->prepare("
                                        SELECT M.post_iD, M.uid_fk, M.message, M.created, U.username, M.uploads
                                        FROM Posts M, users U
                                        WHERE U.status = '1' AND M.uid_fk = U.uiD AND M.uid_fk = '$uiD' $morequery
                                        ORDER BY M.post_iD DESC limit" .$this->perpage);
            while( $row = $sth->fetchAll(PDO::FETCH_ASSOC) ){
                $data = $row;
            }
        return $data;
    }
