rahisi/rahisi-db

这是数据库查询功能

v1.0.0 2023-04-09 22:37 UTC

This package is auto-updated.

Last update: 2024-09-11 00:20:34 UTC


README

rahisiDb 库用于简化与数据库的交互

要求

PHP 版本和扩展

  • PHP 8.1.6rahisiDb v1.1.1 起支持

用法

自 1.0.0 版本以来,该库的最简单用法如下

<?php

require_once __DIR__ . '/vendor/autoload.php';

use Rahisi\RahisiDb\DB;

// selecting
DB::table("accounts")->where(["id" => 1])->get() //this will select * from accounts where id = 1

// inserting
DB::table("accounts")->insert(["id" => 1]) //this will INSERT INTO accounts set ("id") value (1)

// Updating
DB::table("accounts")->Update(["name" => "josh"])->where(['id'=>1])->save() //this will UPDATE accounts SET `name`="josh" where id=1