Gruppen können angelegt und bearbeitet werden
Teili können angelegt werden
This commit is contained in:
@ -17,6 +17,21 @@ class DatabaseHandler {
|
||||
return $this->getResults($sql);
|
||||
}
|
||||
|
||||
public function insertRows(string $tableName, array $newData) : int
|
||||
{
|
||||
global $wpdb;
|
||||
$tableName = $wpdb->prefix . $tableName;
|
||||
$wpdb->insert( $tableName, $newData );
|
||||
return $wpdb->insert_id;
|
||||
}
|
||||
|
||||
public function updateRows(string $tableName, array $newData, $conditions = [])
|
||||
{
|
||||
global $wpdb;
|
||||
$tableName = $wpdb->prefix . $tableName;
|
||||
$wpdb->update( $tableName, $newData, $conditions );
|
||||
}
|
||||
|
||||
public function countSqlRows(string $tableName, array $conditions = []) : int
|
||||
{
|
||||
global $wpdb;
|
||||
|
Reference in New Issue
Block a user