PHPackages                             kroyxlab/datbazo - 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. kroyxlab/datbazo

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

kroyxlab/datbazo
================

DatBazo(Datuma Bazo, Database in Esperanto) is a SQL-query constructor using PDO.

1.2.0(7y ago)014MITPHPPHP &gt;=7

Since Apr 3Pushed 7y agoCompare

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

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

 [![](./DatBazo.png)](./DatBazo.png)

 [![](./docs/eo.png)](./README_EO.md) [![](./docs/es.png)](./README_ES.md)

DatBazo
=======

[](#datbazo)

DatBazo(Datuma Bazo, Database in Esperanto) is a SQL-query constructor using PDO. is a small library with which you can quickly create queries to the database using the "Prepare" and "Execute" methods of PDO to avoid sql injections.

Table of contents
-----------------

[](#table-of-contents)

1. [Dependencies](#Dependencies)
2. [Install](#Install)
3. [Getting started](#Getting-started)
4. [Methods](#Methods)
5. [Author](#Author)
6. [License](#License)

Dependencies
------------

[](#dependencies)

This package requires PHP 7 or higher.

Install
-------

[](#install)

### via composer

[](#via-composer)

```
composer require kroyxlab/datbazo
```

### Copy repository

[](#copy-repository)

Copy the direct repository to your project and require the class.

```
require_once 'proyect_directory/datbazo/src/DatBazo.php';
use kroyxlab\datbazo\DatBazo as DatBazo;
```

Getting started
---------------

[](#getting-started)

Modify the KLPdo.ini file located in the folder `vendor/kroyxlab/datbazo/src/DBconfig.ini` and modify the values to configure the connection to the database.

```
[databazo]
db_driver = Mysql || sqlite3 || pgsql
db_host = Host_name
db_port = Port
db_name = Database_name
db_user = user
db_password = password
db_charset = UTF8
```

If everything is configured correctly, you can start using the library.

```
require_once "vendor/autoload.php";
use kroyxlab\datbazo\DatBazo as DatBazo;

// instantiate the DatBazo class
$productos = new DatBazo;

// Create an SQL statement using the methods of the KLPdo class
$products->select(['products'=>'name, price'])
          ->where(['price'=>['>=', 12.5]])
          ->order('price')
          ->execute();

// Set the type of fetch you want.
$products->fetch('assoc');

// Use the Method -> render (); to output and format the result of the sql query
$products->render(function($product){

  return "The name of the product is {$product['name']} and the price is {$product['price']}";

});

// Or use a foreach loop using the fetch method

foreach($products->fecth('obj') as $product){
  echo "The name of the product is $product->name and the price is $product->price"
}
```

Methods
-------

[](#methods)

The methods of the DatBazo class help to create an SQL statement which will be executed through the `prepare` and `execute` methods of Pdo to avoid SQL injections.

### **List of methods:**

[](#list-of-methods)

- [Select()](./docs/en/select.md)
- [join()](./docs/en/join.md)
- [Insert()](./docs/en/insert.md)
- [Where()](./docs/en/where.md)
- [Update()](./docs/en/update.md)
- [Delete()](./docs/en/delete.md)
- [Limit()](./docs/en/limit.md)
- [Offset()](./docs/en/offset.md)
- [Group()](./docs/en/group.md)
- [Order()](./docs/en/order.md)
- [Execute()](./docs/en/execute.md)
- [Fetch()](./docs/en/fetch.md)
- [Render()](./docs/en/render.md)

**Author**
----------

[](#author)

- **Kristian Soto (KroyxLab)** - [Github](https://github.com/KroyxLab) | [Gitlab](https://gitlab.com/KroyxLab)

**License**
-----------

[](#license)

This project is licensed under the MIT License - see the [MIT.md](license.md) file for details

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

3

Last Release

2586d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b1046e3e1ef42fc66c0cb72d2cdae8c1e2b441803728233f71b2273c474ba25?d=identicon)[kroyxlab](/maintainers/kroyxlab)

---

Top Contributors

[![kroyxt](https://avatars.githubusercontent.com/u/32278660?v=4)](https://github.com/kroyxt "kroyxt (9 commits)")

---

Tags

databaseesperantophpphpdatabasesqlpdoEsperantobase de datosdatumobazo

### Embed Badge

![Health badge](/badges/kroyxlab-datbazo/health.svg)

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

###  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)[druidfi/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

35489.8k6](/packages/druidfi-mysqldump-php)[popphp/pop-db

Pop Db Component for Pop PHP Framework

1814.6k11](/packages/popphp-pop-db)

PHPackages © 2026

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