Delete all records from table

1
$DATA->delete("data_api_test", true);

Write new data

1
$DATA->write("data_api_test", array("test_int" => 5));

Update record

1
$DATA->update("data_api_test", array("test_char" => "foo"), "test_int = 5");

Update, append if record doesn't exist

1
$DATA->update("data_api_test", array("test_text" => "bar"), "test_int = 6");

Select data

1
print_r($DATA->select("data_api_test"));
Array ( [0] => Array ( [ID_API_TEST] => 1877 [test_time] => 2022-05-25 03:10:07 [test_char] => foo [test_int] => 5 [test_date] => 0000-00-00 [test_text] => )[1] => Array ( [ID_API_TEST] => 1878 [test_time] => 2022-05-25 03:10:07 [test_char] => [test_int] => 0 [test_date] => 0000-00-00 [test_text] => bar ))

Select data, index by primary key

1
print_r($DATA->select("data_api_test", array(), false, "ID_API_TEST"));
Array ( [1877] => Array ( [ID_API_TEST] => 1877 [test_time] => 2022-05-25 03:10:07 [test_char] => foo [test_int] => 5 [test_date] => 0000-00-00 [test_text] => )[1878] => Array ( [ID_API_TEST] => 1878 [test_time] => 2022-05-25 03:10:07 [test_char] => [test_int] => 0 [test_date] => 0000-00-00 [test_text] => bar ))