Download the PHP package jameslevi/neutrino without Composer
On this page you can find all versions of the php package jameslevi/neutrino. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jameslevi/neutrino
More information about jameslevi/neutrino
Files in jameslevi/neutrino
Package neutrino
Short Description Is a simple database library using PDO in PHP.
License MIT
Informations about the package neutrino
Neutrino
Is a simple database library using PDO in PHP.
Supported Drivers
- MySQL
- Microsoft SQL Server
Installation
You can install via composer.
Add the composer autoload to your project.
Import neutrino into your project.
The Basics
Establishing Connection
You can establish connection by providing the name of your database, server name, username and password.
Always remember to close the connection each time after use.
Establishing Connection using DSN String
Basic Query
Use get method if expecting results such as SELECT queries.
Use exec method if no result is expected such as UPDATE, INSERT or DELETE queries.
Parameters
You can bind values indirectly to your SQL script.
Parameter Data Types
You can declare the data type of each parameters.
Parameter data types supports string, integer, boolean and null.
Fetching Results
You can return the list of result using fetch method.
Get Result Helper Methods
You can get row by index number in a result list.
You can easily get the first and last row from the result list.
You can return a list of values from a single column.
You can return the column names available from the result.
You can determine the number of rows from the result.
Return result as array.
Return result as json.
PDO Attributes
You can set PDO attributes before establishing the connection.
Error Handling
Speficy how the driver will report errors. Values can be silent, warning or exception.
Column Name Cases
Specify the case of the column names.
Transformations
Convert numeric values into string.
Convert empty string to null.
Convert null to empty string.
Buffer Size
Value might vary depending on driver.
Buffered Queries
Force queries to be buffered. Only available in MySQL.
Timeout
Set the query timeout in seconds. Only available in Microsoft SQL Server.
Contribution
For issues, concerns and suggestions, you can email James Crisostomo via [email protected].
License
This package is an open-sourced software licensed under MIT License.