PHPackages                             linshuntao/mysql - 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. linshuntao/mysql

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

linshuntao/mysql
================

the class use for mysql database

06PHP

Since Sep 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/linshuntao/composer-mysql)[ Packagist](https://packagist.org/packages/linshuntao/mysql)[ RSS](/packages/linshuntao-mysql/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

composer-mysql
==============

[](#composer-mysql)

\#MysqlClass 封装了mysql类

\#主要的方法： #//host为主机名，user为数据库用户，pwd为数据库密码，dbname为数据库名 #1.public function \_\_construct($host, $user, $pwd, $dbname)

\#//向数据库中插入数据，第一个参数表示要插入的表名，第二个参数是一个数组，数组的键名为数据表的字段名，数组的值为要插入的值，字符类型的需代理引号。 #2.public function insert($table, $inCondition)

\#/\*

- 选择语句，第一个参数为要查询的表名，
- ```
         第二个参数为一个数组，存储要查询的字段，如a('name','id'),也可以为全部查询，a('*').

    ```
- ```
         第三个参数为一个数组，存储要查询的条件，数组的下标为数据表的字段名，需带有条件符号，如'='，’>‘等，数组的值为要查询的值

    ```
- ```
         如$a1 = array('name=AND' => 'hhhh','id>=' => 7);支持多条件，需在前一个字段名后面带上

    ```

\*/

\#3.public function select($table, $getField, $inCondition)

\#/\*

- 删除语句，第一个参数为要删除的表名，
- ```
         第二个参数为一个数组，存储要查询的条件，数组的下标为数据表的字段名，需带有条件符号，如'='，’>‘等，数组的值为要删除的            值。

    ```
- ```
          如$a1 = array('name=AND' => 'hhhh','id>=' => 7);支持多条件，需在前一个字段名后面带上

    ```

\*/

\#4. public function delete($table, $inCondition = '')

\#//整表删除，参数为要删除的表名。 #5.public function drop($table)

\#/\*

- 修改语句，第一个参数为要修改的表名，
- ```
         第二个参数为一个数组，存储要修改的值，数组的下标为数据表的字段名，数组的值为要修改的值，如a('name'=>'lin','id'=>1)。

    ```
- ```
         第三个参数为一个数组，存储要修改的条件，数组的下标为数据表的字段名，需带有条件符号，如'='，’>‘等，数组的值为要查询的            值。

    ```
- ```
         如$a1 = array('name=AND' => 'hhhh','id>=' => 7);支持多条件，需在前一个字段名后面带上

    ```

\*/

\#6. public function updata($table, $inData, $inCondition)

\#待续....

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9a59c992928386273a60518f38606812dabe162c770930c62b3bb0a1d4b5a0a?d=identicon)[司马三思](/maintainers/%E5%8F%B8%E9%A9%AC%E4%B8%89%E6%80%9D)

---

Top Contributors

[![linshuntao](https://avatars.githubusercontent.com/u/20575487?v=4)](https://github.com/linshuntao "linshuntao (5 commits)")

### Embed Badge

![Health badge](/badges/linshuntao-mysql/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/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)
