PHP code example of nia-cloud-official / lola-sdk

1. Go to this page and download the library: Download nia-cloud-official/lola-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nia-cloud-official / lola-sdk example snippets


define('DB_HOST', 'your_db_host');
define('DB_USER', 'your_db_user');
define('DB_PASS', 'your_db_password');
define('DB_NAME', 'your_db_name');
define('LIST_TABLE', 'your_table_name'); // Optional

$conn = new DatabaseController();
$conn->establishConnection();

$items = $conn->collectList();
print_r($items);

$filteredItems = $conn->isFilterApplied();
print_r($filteredItems);

$data = [
    'column1' => 'value1',
    'column2' => 'value2',
    // Add other columns and values as needed
];
$conn->addItem($data);

$id = 123; // Replace with the actual ID
$conn->deleteItem($id);