Download the PHP package jameslevi/hadron without Composer

On this page you can find all versions of the php package jameslevi/hadron. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hadron

Hadron

Is a simple PHP library for MySQL using PDO.

Installation

  1. You can install via composer.

  2. Paste the following code above your project if not using any PHP framework.

  3. Import hadron into your project.

The Basics

This is a basic example on how to implement hadron in your project.

Connecting with your MySQL database

  1. Create a new hadron instance.

  2. You can also use this magic method.

  3. Set your MySQL credentials.

  4. You can also set your server name.

  5. You can set your MySQL port number if not using 3306.

  6. Set the default charset from utf8mb4 to your choice.

  7. The connection will only be established after calling the connect method.

  8. You can determine if connection was established using isConnected method.

  9. Always close each connection after use.

Getting data from the database

  1. Use get method when your query expects result from the database.

  2. You can count the number of rows returned.

  3. You can check if the query returns nothing.

  4. You can get the first and the last row of the result.

  5. You can also get row by index number.

  6. If query returns only a single row, you can directly get each column.

  7. And if query returns a multiple row, you can access each column like object properties.

  8. You can return the result as an array.

  9. You can also return the result as json.

Executing Queries

  1. You can use exec method to execute queries expecting no results such as UPDATE, INSERT and DELETE.

  2. You can determine if query is a success.

  3. You can also know how many rows your query has affected.

Placeholder

Instead of concatenating string to build your SQL query, you can use placeholder to inject values into your SQL query.

You can also directly pass your placeholder in the query method.

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.


All versions of hadron with dependencies

PHP Build Version
Package Version
Requires jameslevi/objectify Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jameslevi/hadron contains the following files

Loading the files please wait ....