承接 liberty_code/mysql 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

liberty_code/mysql

最新稳定版本:v1.0.0

Composer 安装命令:

composer require liberty_code/mysql

包简介

Library

README 文档

README

Description

Library contains MySQL components, to use SQL components for MySQL data storage.

Requirement

  • Script language: PHP: version 7 || 8

Installation

Several ways are possible:

Composer

  1. Requirement

    It requires composer installation. For more information: https://getcomposer.org

  2. Command: Move in project root path

     cd "<project_root_path>"
    
  3. Command: Installation

     php composer.phar require liberty_code/mysql ["<version>"]
    
  4. Note

    • Include vendor

      If project uses composer, vendor must be included:

        require_once('<project_root_path>/vendor/autoload.php');
      
    • Configuration

      Installation command allows to add, on composer file "/composer.json", following configuration:

        {
            "require": {
                "liberty_code/mysql": "<version>"
            }
        }
      

Include

  1. Download

    • Download following repository.
    • Put it on repository root path.
  2. Include source

     require_once('<repository_root_path>/include/Include.php');
    

Usage

MySQL database connection

Connection allows to design MySQL database connection, to connect and request on specific MySQL data storage, from specified configuration.

Elements

  • MysqlPdoConnection

    Extends PDO connection features, Allows to design a MySQL database connection, using specific PDO standard.

Example

use liberty_code\sql\database\connection\library\ConstConnection;
use liberty_code\mysql\database\connection\pdo\model\MysqlPdoConnection;
...
// Get connection
$connection = new MysqlPdoConnection(array(
    ConstConnection::TAB_CONFIG_KEY_HOST => 'host',
    ConstConnection::TAB_CONFIG_KEY_DB_NAME => 'db_name'
    ConstConnection::TAB_CONFIG_KEY_CHARSET => 'utf8',
    ConstConnection::TAB_CONFIG_KEY_LOGIN => 'login',
    ConstConnection::TAB_CONFIG_KEY_PASSWORD => 'password'
));
...
// Execute SQL command
$connection->execute('...SQL string command');
...

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-12-01