crojasaragonez / utn-db
Simple database access package for UTN students
Requires
- php: >=7.0.10
Requires (Dev)
- phpunit/phpunit: >=8.0
- squizlabs/php_codesniffer: ^3.0
This package is not auto-updated.
Last update: 2024-11-21 23:47:04 UTC
README
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
Structure
If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.
bin/
build/
docs/
config/
src/
tests/
vendor/
Install
Via Composer
$ composer require crojasaragonez/utn-db
Usage
require_once 'vendor/autoload.php'; use crojasaragonez\UtnDb\PgConnection; $con = new PgConnection('postgres', '12345', 'pmo', 5432, 'localhost'); $con->connect(); $sql = "INSERT INTO projects(name, description, start_date, end_date) VALUES ($1, $2, $3, $4)"; $con->runStatement($sql, ['Project 1', 'project description', '2020-01-01', '2020-01-02']); $results = $con->runQuery('SELECT * FROM projects WHERE id >= $1', [1]); var_dump($results); $con->disconnect();
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email crojas@golabstech.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.