PHPackages                             hutong/database - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. hutong/database

ActiveLibrary[Database &amp; ORM](/categories/database)

hutong/database
===============

数据库连接

v1.0.1(3y ago)1402MITPHPPHP &gt;=7.0.0

Since Oct 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/HuTong/database)[ Packagist](https://packagist.org/packages/hutong/database)[ RSS](/packages/hutong-database/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

database
========

[](#database)

### yaf 配置模式

[](#yaf-配置模式)

```
数据库连接 多库连接配置
;数据库配置信息
database.default.driver     = "mysql"
database.default.type       = "Pdos"
database.default.host       = "127.0.0.1"
database.default.name       = "yaf"
database.default.user       = "root"
database.default.password   = "root"
database.default.port       = 3306
database.default.charset    = utf8
;other
database.other.driver     = "mysql"
database.other.type       = "Pdos"
database.other.host       = "127.0.0.1"
database.other.name       = "other"
database.other.user       = "root"
database.other.password   = "root"
database.other.port       = 3306
database.other.charset    = utf8

```

### 常量配置模式

[](#常量配置模式)

```
array(
    'default' => array(
        'driver' => 'mysql',
        'type' => 'Pdos',
        'host' => '127.0.0.1',
        'name' => 'yaf',
        'user' => 'root',
        'password' => 'root',
        'port' => '3306',
        'charset' => 'utf8'
    ),
    'other' => array(
        'driver'    => 'mysql',
        'type'      => 'Pdos',
        'host'      => '127.0.0.1',
        'name'      => 'other',
        'user'      => 'root',
        'password'  => 'root',
        'port'      => '3306',
        'charset'   => 'utf8'
    )
)

```

### 学习交流群

[](#学习交流群)

630730920

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~998 days

Total

2

Last Release

1449d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8066878?v=4)[HuTong](/maintainers/HuTong)[@HuTong](https://github.com/HuTong)

---

Top Contributors

[![HuTong](https://avatars.githubusercontent.com/u/8066878?v=4)](https://github.com/HuTong "HuTong (33 commits)")

### Embed Badge

![Health badge](/badges/hutong-database/health.svg)

```
[![Health](https://phpackages.com/badges/hutong-database/health.svg)](https://phpackages.com/packages/hutong-database)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M117](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
