home/abhiramc/public_html/acts.service/objects/setting.php 0000644 00000003075 15021222627 0017760 0 ustar 00 conn = $db;
}
/******************************************************************************/
// create Office
function setting_create(){
// query to insert record
$query = "INSERT INTO " . $this->table_name . " SET gmap_api=:gmap_api";
echo $query;
// prepare query
$stmt = $this->conn->prepare($query);
// sanitize
$this->gmap_api=htmlspecialchars(strip_tags($this->gmap_api));
// bind values
$stmt->bindParam(":gmap_api", $this->gmap_api);
// execute query
if($stmt->execute()){
return true;
}
return false;
}
/******************************************************************************/
function setting_read(){
// set ID property of record to read
$query = "SELECT gmap_api FROM " . $this->table_name . " order by setting_id desc limit 1";
// prepare query statement
$stmt = $this->conn->prepare($query);
//$stmt->bindParam(":ts_empid", $this->ts_empid);
// execute query
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
$result = $row["gmap_api"];
}
return $result;
}
/******************************************************************************/
}
?>