public function create () : bool
	{
        $dbObject 	= Database::getInstance();
		$attributes = $this->sanitizedAttributes();
		$sqlQuery	= "INSERT INTO ".static::$tableName." (";
		$sqlQuery  .= join(", ", array_keys($attributes));
	  	$sqlQuery  .= ") VALUES ('";
		$sqlQuery  .= join("', '", array_values($attributes));
		$sqlQuery  .= "')";
		$result 	= $dbObject->query($sqlQuery);
    	$this->id 	= $dbObject->insertId();
    	return ($result) ? TRUE : FALSE;
	}
public function create () : bool
	{
        $dbObject 	= Database::getInstance();
		$attributes = $this->sanitizedAttributes();
		$sqlQuery	= "INSERT INTO ".static::$tableName." (";
		$sqlQuery  .= join(", ", array_keys($attributes));
	  	$sqlQuery  .= ") VALUES ('";
		$sqlQuery  .= join("', '", array_values($attributes));
		$sqlQuery  .= "')";
		$result 	= $dbObject->query($sqlQuery);
    	$this->id 	= $dbObject->insertId();
    	return ($result) ? TRUE : FALSE;
	}
public function create ( ) : bool { $ dbObject = Database :: getInstance ( ) ; $ attributes = $ this -> sanitizedAttributes ( ) ; $ sqlQuery = "INSERT INTO " . static :: $ tableName . " (" ; $ sqlQuery .= join ( ", " , array_keys ( $ attributes ) ) ; $ sqlQuery .= ") VALUES ('" ; $ sqlQuery .= join ( "', '" , array_values ( $ attributes ) ) ; $ sqlQuery .= "')" ; $ result = $ dbObject -> query ( $ sqlQuery ) ; $ this -> id = $ dbObject -> insertId ( ) ; return ( $ result ) ? TRUE : FALSE ; }
Create new record in the database.
@return bool
Create new record in the database .