PHPackages                             stechbd/sde - 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. stechbd/sde

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

stechbd/sde
===========

S Database Explorer (SDE) is a simple and lightweight MySQL database explorer library based on PHP and PDO.

3.0.1(2y ago)0221GPL-3.0PHP

Since Jul 16Pushed 2y agoCompare

[ Source](https://github.com/STechBD/S-Database-Explorer)[ Packagist](https://packagist.org/packages/stechbd/sde)[ Docs](https://www.stechbd.net/project/SDE/)[ RSS](/packages/stechbd-sde/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (6)Used By (0)

S Database Explorer (SDE)
=========================

[](#s-database-explorer-sde)

**S Database Explorer (SDE)** is a simple and lightweight **MySQL** database explorer library based on **PHP** and PDO. It is a free and open-source database management library that helps you to manage your MySQL database.

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Features](#features)
- [Change log](#change-log)
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Security](#security)
- [Future Plan](#future-plan)
- [Author](#author)
- [Contributors](#contributors)
- [About S Technologies](#about-s-technologies)
- [Support](#support)
- [Hire Us](#hire-us)
- [Contribute](#contribute)
- [Privacy Policy](#privacy-policy)
- [Terms &amp; Conditions](#terms--conditions)
- [Copyright](#copyright)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- PDO PHP Extension
- JSON PHP Extension

Features
--------

[](#features)

- Create table
- Insert record
- Update record
- Delete record
- Select record
- Select all records
- Select records with where clause
- Select records with where clause and limit
- Select records with where clause, limit and offset
- Select records with where clause, limit, offset and order by
- Run custom query

Change log
----------

[](#change-log)

### Version 3.0.1 (August 15, 2023)

[](#version-301-august-15-2023)

- Fixed bugs.

### Version 3.0.0 (July 16, 2023)

[](#version-300-july-16-2023)

- Added support for PHP 7.4 or higher.
- Replaced MySQLi with PDO.
- Renamed 'custom query' method to `run()`.
- Renamed 'last insert item' method to `last()`.
- Renamed 'number of rows count' method to `count()`.
- Added 'JSON output' method.
- Added 'sum' method.
- Added `CHANGELOG.md` file.
- Added `composer` support.

### Version 2.0.0 (December 7, 2017)

[](#version-200-december-7-2017)

- Removed MySQL support and kept only MySQLi support.

### Version 1.0.0 (August 14, 2015)

[](#version-100-august-14-2015)

- Initial release.

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Installation
------------

[](#installation)

S Database Explorer (SDE) can be used directly using downloaded package or can be installed using composer:

```
composer require stechbd/sde
```

Usage
-----

[](#usage)

### Autoload the library

[](#autoload-the-library)

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

### Connecting to a database

[](#connecting-to-a-database)

```
$sde = new STechBD\SDE('name', 'username', 'password', 'host', 'prefix');
```

### Inserting a record

[](#inserting-a-record)

```
$sde->insert('users', 'name, email, password', ':name, :email, :password', [
    'name'      =>  'John Doe',
    'email'     =>  'john@stechbd.net',
    'password'  =>  '123456',
    'salary'    =>  '10000'
]);
```

### Updating a record

[](#updating-a-record)

```
$sde->update('users', 'email = :email', 'id = :id' [
	'email' =>  'doe@stechbd.net',
	'id'    =>  1
]);
```

### Deleting a record

[](#deleting-a-record)

```
$sde->remove('users', 'id = :id', [
	'id' => 1
]);
```

### Selecting records

[](#selecting-records)

#### Selecting all column

[](#selecting-all-column)

```
$sde->select('*', 'users');
```

#### Selecting specific columns

[](#selecting-specific-columns)

```
$sde->select('id, name, email', 'users');
```

#### Selecting records with where clause

[](#selecting-records-with-where-clause)

```
$sde->select('id, name, email', 'users', 'id = :id', false, false, [
	'id' => 1
]);
```

#### Selecting records with where and limit clause

[](#selecting-records-with-where-and-limit-clause)

```
$sde->select('id, name, email', 'users', 'id = :id', 10, false, [
	'id' => 1
]);
```

#### Selecting records with where, limit, and order by clause

[](#selecting-records-with-where-limit-and-order-by-clause)

```
$sde->select('id, name, email', 'users', 'id = :id', '10, 0', 'id DESC', [
	'id' => 1
]);
```

#### Selecting records with where, limit, order by, and offset clause

[](#selecting-records-with-where-limit-order-by-and-offset-clause)

```
$sde->select('id, name, email', 'users', 'id = :id', '10', 'id DESC', '15', [
	'id' => 1
]);
```

### Running custom query

[](#running-custom-query)

```
$sde->run('SELECT * FROM users WHERE id = 1');
```

### Getting JSON output

[](#getting-json-output)

```
$sde->json($result);
```

### Getting last insert item

[](#getting-last-insert-item)

```
$sde->last();
```

### Getting number of rows

[](#getting-number-of-rows)

```
$sde->count('users', 'id = :id', [
	'id' => 1
]);
```

### Getting sum of a column

[](#getting-sum-of-a-column)

```
$sde->sum('users', 'salary', 'id = :id', [
	'id' => 1
]);
```

License
-------

[](#license)

S Database Engine (SDE) is open-sourced software licensed under the [GPLv3 license](LICENSE).

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Future Plan
-----------

[](#future-plan)

- Create database
- Drop database
- Create table
- Alter table
- Drop table
- Truncate table
- Rename table
- Add column
- Rename column
- Drop column
- Add index
- Drop index
- Add foreign key
- Drop foreign key
- Add unique key
- Drop unique key
- Add primary key
- Drop primary key
- Add auto increment
- Drop auto increment

Author
------

[](#author)

- [Md. Ashraful Alam Shemul](https://github.com/AAShemul)

Contributors
------------

[](#contributors)

None yet.

About S Technologies
--------------------

[](#about-s-technologies)

**S Technologies** (**STechBD.Net**) is a research-based technology company in Bangladesh. It was founded in 2013. It provides services like domain registration, web hosting, web servers, software development, AI model development, software as a service (SasS), UI/UX design, SEO, business solutions, etc. **S Technologies** has been working in research of new technologies especially in artificial intelligence, and developing new products. You'll find an overview of all our open source products [on our website](https://www.stechbd.net/open-source).

Support
-------

[](#support)

If you are having general issues with this package, feel free to contact us on [STechBD.Net/support](https://www.stechbd.net/support).

If you believe you have found an issue, please report it using the [GitHub issue tracker](https://github.com/STechBD/SDE/issues), or better yet, fork the repository and submit a pull request.

- [Home Page](https://www.stechbd.net/product/S-Database-Explorer)
- [Documentation](https://docs.stechbd.net/S-Database-Explorer/)
- [GitHub Issues](https://github.com/STechBD/S-Database-Explorer/issues)
- [Composer Package](https://packagist.org/packages/STechBD/SDE)
- [Email](mailto:product@stechbd.net)
- [Support Page](https://www.stechbd.net/support)
- [Contact Form](https://www.stechbd.net/contact)
- [Facebook](https://www.facebook.com/STechBD.Net)
- [X (Twitter)](https://twitter.com/STechBD_Net)
- [LinkedIn](https://www.linkedin.com/company/STechBD)
- [Instagram](https://www.instagram.com/STechBD.Net)
- [YouTube](https://www.youtube.com/channel/STechBD)

Hire Us
-------

[](#hire-us)

- [AI App Development](https://www.stechbd.net/ai-development)
- [Web App Development](https://www.stechbd.net/web-development)
- [Android App Development](https://www.stechbd.net/android-app-development)
- [iOS App Development](https://www.stechbd.net/ios-app-development)

Contribute
----------

[](#contribute)

- [GitHub](https://github.com/STechBD/S-Database-Explorer)

More
----

[](#more)

- [Privacy Policy](https://www.stechbd.net/privacy)
- [Terms &amp; Conditions](https://www.stechbd.net/terms)
- [Refund Policy](https://www.stechbd.net/refund-policy)
- [Software License Agreement](https://www.stechbd.net/software-license-agreement)

Copyright
---------

[](#copyright)

© 2013-24 **[S Technologies](https://www.stechbd.net)**. All rights reserved.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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 ~44 days

Total

5

Last Release

861d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d4bb8f1c9ba62182c30516b43a6960fb8fc1aaf35c9a5d5c795eb53480d1643?d=identicon)[AAShemul](/maintainers/AAShemul)

![](https://avatars.githubusercontent.com/u/72219299?v=4)[S Technologies](/maintainers/STechBD)[@STechBD](https://github.com/STechBD)

---

Top Contributors

[![AAShemul](https://avatars.githubusercontent.com/u/47167338?v=4)](https://github.com/AAShemul "AAShemul (25 commits)")

---

Tags

aashemuldatabasedatabase-managementmysqlpdopdo-mysqlphpphp-librarystechbdphpdatabasemysqlpdosdestechbdaashemul

### Embed Badge

![Health badge](/badges/stechbd-sde/health.svg)

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

###  Alternatives

[ifsnop/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k5.5M69](/packages/ifsnop-mysqldump-php)[clouddueling/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k22.9k](/packages/clouddueling-mysqldump-php)[popphp/pop-db

Pop Db Component for Pop PHP Framework

1814.6k11](/packages/popphp-pop-db)[riverside/php-orm

PHP ORM micro-library and query builder

111.2k](/packages/riverside-php-orm)

PHPackages © 2026

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