Hi all, just beginning to learn about oop for php. I am currently doing a news script. I would like to ask whether the method below is apporiate.

For Example
PHP Code:
    $results $db_sql->query("SELECT post_date, post_title, category_name, user_name FROM $tableposts INNER JOIN $tablecategory ON $tableposts.post_category = $tablecategory.category_id INNER JOIN $tableusers ON $tableposts.post_userid = $tableusers.user_id LIMIT 5");
    while(
$results $db_sql->fetchArray($results)) {
                  
$postinfo[$results[post_id]] = new News;
                  
$postinfo[$results[post_id]]-> displayTime();
                  
$postinfo[$results[post_id]]-> displayDate();
                  
$postinfo[$results[post_id]]-> displayAuthor();
                  
$postinfo[$results[post_id]]-> displayContent();
    }