prismo-smartpro/datalayer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

prismo-smartpro/datalayer

最新稳定版本:2.9

Composer 安装命令:

composer require prismo-smartpro/datalayer

包简介

PDO Datalayer Abstract

README 文档

README

INSTALAÇÃO

run

composer require prismo-smartpro/datalayer

MYSQL CONNECT

<?php
const MYSQL = [
    "host" => "",
    "username" => "",
    "password" => "",
    "db" => ""
];

DOCUMENTAÇÃO

PHP Class
<?php

namespace SmartPRO\Technology;

class Settings extends DataLayer
{
    public function __construct()
    {
        parent::__construct("settings", "id", $required = [], $unique = [], true);
    }
}

Usage examples

<?php

require "Mysql_Config.php";
require "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){
    //...
}

PERSONALIZED

<?php

namespace SmartPRO\Technology;

class Settings extends DataLayer
{
    public function __construct()
    {
        parent::__construct("settings", "id", $required = [], $unique = [], true);
    }
    
    public function fidByEmail($email){
        return $this->find("email = :email", ":email={$email}")->fetch();
    }
}

统计信息

  • 总下载量: 77
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2022-11-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固