myaac/system/libs/data.php
SRNT-GG 8d10082179
WIP - Removing unneccessary closing tags to prevent potential issues. (#223)
* Part 1

Removing closing tags when no HTML or other output comes after the last PHP codeblock.

* Further removals

* nothing

---------

Co-authored-by: slawkens <slawkens@gmail.com>
2023-06-15 20:53:55 +02:00

44 lines
722 B
PHP

<?php
/**
* Data class
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
class Data
{
private $table = '';
public function __construct($table) {
$this->table = $table;
}
public function get($where)
{
global $db;
return $db->select($this->table, $where);
}
public function add($data)
{
global $db;
return $db->insert($this->table, $data);
}
public function delete($data, $where)
{
global $db;
return $db->delete($this->table, $data, $where);
}
public function update($data, $where)
{
global $db;
return $db->update($this->table, $data, $where);
}
}