定制 ahmedmaher0/maher 二次开发

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

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

ahmedmaher0/maher

Composer 安装命令:

composer require ahmedmaher0/maher

包简介

ahmed maher

README 文档

README

class-DB is a small PHP wrapper for MySQL databases in which I used object-oriented programming (OOP) in my industry to make it easier for him to deal with the database in an easy and well-organized way and makes it easy for anyone to use and anyone can use it. I uploaded it to (Packagist (Composer) ) And after you read the summary of what the class does, it's time to learn how to download and run it.

installation

install once with composer:

composer require ahmedmaher0/maher

then add this to your project:

require __DIR__ . '/vendor/autoload.php';
use Ahmed\Maher\db as class_db;
$db = new class_db();

usage

/* connect to database */
$db = new db(['127.0.0.1', 'username', 'password', 'database']);

/* insert/update/delete */
$db->insert('tablename', [ 'key' => 'value' ])->excute();                         // return = true OR false
$db->update('tablename', [ 'key' => 'value' ])->where(['id' => $id])->excute();   // return = true OR false
$db->delete('tablename')->where(['id' => $id])->excute();                         // return = true OR false

/* select */
$db->select('tablename', 'columns')->rows();    // return more than one row
$db->select('tablename', 'columns')->first();   // return 1 Row Data
$db->select('tablename', 'columns')->where(['id' => $id])->first();    // return 1 Row Data

$db->select('tablename', 'columns')->where(['id' => $id])->andWhere(['id' => $id])->first(); // return 1 Row Data

$db->select('tablename', 'columns')->where(['id' => $id])->orWhere(['id' => $id])->first(); // return 1 Row Data

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固