mireiawen/mysqlie 问题修复 & 功能扩展

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

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

mireiawen/mysqlie

Composer 安装命令:

composer require mireiawen/mysqlie

包简介

MySQLi extended

README 文档

README

Extended MySQLi classes. All of the methods that can return error, should throw exceptions when and only error occurs.

There are also some custom methods added to make some tasks easier.

  • Classes: MySQLie, MySQLie_stmt
  • Namespace: Mireiawen\MySQLie

Requirements

  • MySQL Native Driver (mysqlnd)
  • PHP 7

Installation

You can clone or download the code from the GitHub repository or you can use composer: composer require mireiawen/mysqlie

Methods

Only the custom methods are listed here, the overridden methods should behave like the original methods, except that the errors are thrown.

Class MySQLie

The main MySQLie class

escape_identifier

MySQLie::escape_identifier(string $name)

Escape an identifier name for the SQL query

Arguments
  • string $name - The identifier name to escape
Return value
  • string - The escaped identifier name

escape_query_identifiers

MySQLie::escape_query_identifiers(string $sql, array $identifiers)

Escape the identifiers in the SQL query

Arguments
  • string $sql - SQL query with placeholders (%s) for the identifiers
  • string[] $identifiers - Array of the identifiers to be escaped and placed into the query
Return value
  • string - The SQL query with identifiers escaped and placed into the query

foreign_key_checks

MySQLie::foreign_key_checks(bool $state)

Set the foreign key checks on or off

Arguments
  • bool $state - TRUE to enable foreign key checks, FALSE to disable them
Exceptions thrown
\Exception
  • In case of database errors

get_autocommit

MySQLie::get_autocommit()
Return value
  • bool - The current AUTOCOMMIT status, TRUE if it is on, FALSE if it is off
Exceptions thrown
\Exception
  • In case of database errors

get_autoincrement

MySQLie::get_autoincrement(string $table)

Get the table auto increment value

Arguments
  • string $table - The name of the table to get the AUTO_INCREMENT value from
Return value
  • int - The value of the table AUTO_INCREMENT
Exceptions thrown
\Exception
  • In case of database errors

truncate

MySQLie::truncate(string $table)

Truncates the given table to zero rows

Arguments
  • string $table - Name of the table to be truncated
Exceptions thrown
\Exception
  • In case of database errors

MySQLie_stmt

fetch_assoc

MySQLie_stmt::fetch_assoc()

Fetch the result as an associative array

Return value
  • array - An array of result rows
Exceptions thrown
\Exception
  • In case of database errors

fetch_first

MySQLie_stmt::fetch_first()

Fetch the first row of the statement and return the result as an associative array

Return value
  • array - A result row as an associative array
Exceptions thrown
\Exception
  • In case of database errors

mireiawen/mysqlie 适用场景与选型建议

mireiawen/mysqlie 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 84 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 09 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 mireiawen/mysqlie 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mireiawen/mysqlie 我们能提供哪些服务?
定制开发 / 二次开发

基于 mireiawen/mysqlie 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-03