1. Go to this page and download the library: Download prismo-smartpro/datalayer 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/ */
namespace SmartPRO\Technology;
class Settings extends DataLayer
{
public function __construct()
{
parent::__construct("settings", "id", $
e "vendor/autoload.php";
use SmartPRO\Technology\Settings;
// Returns all data from the table
$results = (new Settings())->fetchAll();
// Returns data starting from a specific id
$byId = (new Settings())->findById(17);
// Edit the data that returns and saves the data
if (!empty($byId)) {
$byId->empresa = "My Business";
$byId->save();
}
// Deletes the returned query from the database
if (!empty($byId)) {
$byId->destroy();
}
// Makes a search query using the LIKE parameter
$search = (new Settings())->search("empresa like :empresa", ":empresa=My Business");
// Query with custom data
$results = (new Settings())->find("empresa = :empresa", ":empresa=My Business", "*")
->limite(5)
->order("id DESC")
->gruopBy("site")
->offset(0)
->fetch(true);
foreach ($results as $result){
//...
}
namespace SmartPRO\Technology;
class Settings extends DataLayer
{
public function __construct()
{
parent::__construct("settings", "id", $
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.