PHPackages                             andresg9108/connectiondb - 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. andresg9108/connectiondb

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

andresg9108/connectiondb
========================

0.3.2(5y ago)154MITPHP

Since Jul 16Pushed 5y agoCompare

[ Source](https://github.com/andresg9108/connectiondb)[ Packagist](https://packagist.org/packages/andresg9108/connectiondb)[ RSS](/packages/andresg9108-connectiondb/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (7)Used By (0)

**Excuses:** ***I apologize for the English used, my language is Spanish.***

Data Base Connection
====================

[](#data-base-connection)

Content
-------

[](#content)

1. [Introduction.](#Introduction "Introduction")
2. [Dependencies.](#Dependencies "Dependencies")
3. [Starting.](#Starting "Starting")

Introduction
------------

[](#introduction)

This project aims to create a connection to various database engines like MySQL or SQLite.

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

[](#dependencies)

- XAMPP ().
- Composer ().

Starting
--------

[](#starting)

Start by creating a folder called "example" in the path we want for our example project. Then we will execute the following command, using the console of your operating system and stopped in the "example" folder, that will create a "composer.json" file following the instructions given by the console.

***composer init***

Then we will add the project dependency "andresg9108/connectiondb", using the following command:

***composer require andresg9108/connectiondb***

Now we will open the "XAMPP Control Panel" and give "Start" to "Apache" and "MySQL". Enter the "PhpMyAdmin" which can normally be entered using the URL "", we will create a new database called "example" and run the following script.

```
CREATE TABLE example(
id int NOT NULL AUTO_INCREMENT,
name VARCHAR(200),
last VARCHAR(200),
phone VARCHAR(200),
PRIMARY KEY(id)
);

```

This will create the "example" table that will serve to test this project.

Now we will create a new file called "test.php" inside the "example" folder and we will add the following code:

**File: ../example/test.php**

```
