Simple database access package for UTN students

1.0.0 2020-02-05 03:25 UTC

This package is not auto-updated.

Last update: 2024-11-21 23:47:04 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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.