PHPackages                             basecode/querymodel - 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. basecode/querymodel

ActiveLibrary

basecode/querymodel
===================

QueryModel Component...

1.1.1(4y ago)07MITPHPPHP &gt;=7.0

Since Aug 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/arthurthcoder/querymodel)[ Packagist](https://packagist.org/packages/basecode/querymodel)[ RSS](/packages/basecode-querymodel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

**QueryModel**
==============

[](#querymodel)

[![route license](https://camo.githubusercontent.com/b90b3b5cf5375b411f52b59d2e524b5da1af5967e3ead5f02de708b64e81ad83/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6172746875727468636f6465722f71756572796d6f64656c3f636f6c6f723d253233333243373534266c6f676f3d4d4954)](https://camo.githubusercontent.com/b90b3b5cf5375b411f52b59d2e524b5da1af5967e3ead5f02de708b64e81ad83/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6172746875727468636f6465722f71756572796d6f64656c3f636f6c6f723d253233333243373534266c6f676f3d4d4954)[![GitHub tag (latest by date)](https://camo.githubusercontent.com/92caf98e9c1578b3b9d304f661942d0febb05a3ac68ca0ee4ab7202931a66636/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6172746875727468636f6465722f71756572796d6f64656c)](https://camo.githubusercontent.com/92caf98e9c1578b3b9d304f661942d0febb05a3ac68ca0ee4ab7202931a66636/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6172746875727468636f6465722f71756572796d6f64656c)

### What's the QueryModel ?

[](#whats-the-querymodel-)

Abstract: QueryModel is a standalone component for inserting, updating, reading and deleting data in the database. Recommended for projects with mvc structure.

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

You can install the QueryModel in your project with composer.

Just run the command below on your terminal:

```
composer require basecode/querymodel
```

or in your composer.json require:

```
"basecode/querymodel": "1.1.*"
```

Usage
-----

[](#usage)

For the correct functioning of the QueryModel it is necessary that you create a constant named DB\_CONFIG with the access data of the database. See the example below.

Example **config.php** file:

```
