定制 tina4stack/tina4php-mysql 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

tina4stack/tina4php-mysql

Composer 安装命令:

composer require tina4stack/tina4php-mysql

包简介

Tina4 PHP MySQL Database Driver

README 文档

README

MySQL database driver for the Tina4 PHP framework.

Installation

composer require tina4stack/tina4php-mysql

Requirements

  • PHP >= 8.1
  • ext-mysqli
  • tina4stack/tina4php-database ^2.0

Usage

// Connection format: host/port:database
$DBA = new \Tina4\DataMySQL("127.0.0.1/33066:database", "root", "password");

// Execute queries
$DBA->exec("create table users (id integer primary key, name varchar(200))");
$DBA->commit();

// Insert with parameters
$DBA->exec("insert into users (id, name) values (?, ?)", 1, "Alice");

// Fetch records
$result = $DBA->fetch("select * from users");
$records = $result->asArray();

// Fetch with limit and offset
$result = $DBA->fetch("select * from users", 10, 0);

// Fetch single record
$record = $DBA->fetchOne("select * from users where id = 1");

// Check if table exists
$exists = $DBA->tableExists("users");

// Get database metadata
$metadata = $DBA->getDatabase();

Testing

docker compose up -d
composer test

License

MIT - see LICENSE

Our Sponsors

Sponsored with 🩵 by Code Infinity

Code Infinity

Supporting open source communities Innovate Code Empower

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固