<?php
class SMSLog{

	private $conn;
	private $table_name = "sms_log";

	public $id;	
	public $page;
    public $sales_id;	
    public $id_no;		
	public $date_time;	

	public function __construct($db){
		$this->conn = $db;
	}

	function create(){
		$query = "INSERT INTO " . $this->table_name . " SET page=:page, sales_id=:sales_id, id_no=:id_no, date_time=:date_time";
		$stmt = $this->conn->prepare($query);

		$stmt->bindParam(":page", $this->page);
		$stmt->bindParam(":sales_id", $this->sales_id); 
		$stmt->bindParam(":id_no", $this->id_no);
		$stmt->bindParam(":date_time", $this->date_time);

		if($stmt->execute()){
			return true;
		}	 
		return false;
	}

}
?>
