2017 © Pedro Peláez
 

library php-sql

Simple SQL class to use with PHP

image

lcloss/php-sql

Simple SQL class to use with PHP

  • Wednesday, February 21, 2018
  • by lcloss
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

php-sql

A simple Class to work with SQL in PHP, (*1)

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system., (*2)

Prerequisites

You will need a web server and PHP configured. Also, you need to use one of these databases systems: * MariaDB or MySql * SQL Server * SQLite, (*3)

This project is intended to be incorporated into another project, so the minimum prerequisite is the web server, PHP and a Database driver as mentioned above., (*4)

Installing

Installation with Git:, (*5)

git clone https://github.com/lcloss/php-sql.git

Instalação com o Composer:, (*6)

composer require lcloss/php-sql

Running the tests

Initial setup

If you are using MariaDb, MySQL or SQL Server, you need to create the database schema first., (*7)

With your data, write:, (*8)



### Returning Data
$sql = new Sql(); $results = $sql->query("SELECT * FROM table WHERE id = :id", [ ':id' => 1 ]); if ( count($results) > 0 ) { echo 'Found!'; } else { echo 'Not Found...'; }

### Executing SQL Type the following code:
$sql = new Sql(); $sql->query("UPDATE table SET name = :name WHERE id = :id", [ ':id' => 1, ':name' => 'New name', ]);

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us., (*9)

Versioning

We use GitHub for versioning. For the versions available, see the tags on this repository., (*10)

Authors

  • Luciano Closs - Initial work - LCloss

See also the list of contributors who participated in this project., (*11)

License

This project is licensed under the MIT License - see the LICENSE.md file for details, (*12)

Acknowledgments

The Versions

21/02 2018

dev-master

9999999-dev https://github.com/lcloss/php-sql

Simple SQL class to use with PHP

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Luciano Closs

sql database driver database access