Hello guys i am new here and i look forward to be joining you I have an assingment to finish on PHP which is next to reaching its end, but i am still finding myself struggling about finishing my shopping cart This is for the current database that my cart is using and i would apreciate if someone could help me on this bit
<?php
class database {
    private $host = "";
    private $user = "";
    private $password = "";
    private $database = "";
    function __construct() {
        $conn = $this->connectDB();
        if(!empty($conn)) {
            $this->selectDB($conn);
        }
    }
    function connectDB() {
        $conn = new mysqli("", "", "", "");
        return $conn;
    }
    function selectDB($conn) {
        new mysql_select_db($this->database,$conn);
    }
    function runQuery($query) {
        $result = mysql_query($query);
        while($row=mysql_fetch_assoc($result)) {
            $resultset[] = $row;
        }       
        if(!empty($resultset))
            return $resultset;
    }
    function numRows($query) {
        $result  = mysql_query($query);
        $rowcount = mysql_num_rows($result);
        return $rowcount;   
    }
}
?>
 
    