Download the PHP package iamjohndev/ijd-orm without Composer

On this page you can find all versions of the php package iamjohndev/ijd-orm. 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 ijd-orm

IJDORM

IJDORM is a lightweight and easy-to-use ORM (Object-Relational Mapping) library for PHP that provides a convenient way to interact with your MySQL database. With IJDORM, you can perform common CRUD (Create, Read, Update, Delete) operations on your database without having to write complex SQL queries.

Features

Requirements

Installation

IJDORM can be installed via Composer, the dependency management tool for PHP. Run the following command in your project directory to add IJDORM as a dependency:

composer require iamjohndev/ijd-orm

After the installation, you can include the Composer autoloader in your PHP scripts to autoload the IJDORM classes:

require_once 'vendor/autoload.php';

Usage

Creating an Instance

To start using IJDORM, create an instance of the IJDORM class by providing the table name and a database connection object (an instance of mysqli):

Retrieving Data

Find a Record To retrieve a single record from the database by its ID, use the find method:

This will return an object representing the retrieved record.

Retrieve All Records

To retrieve all records from the table, use the all() method:

This will return an array of associative arrays, where each array represents a record.

Custom Queries

If you need to execute custom queries, you can use the get() method:

This will return an array of associative arrays, where each array represents a record that matches the query.

Creating Records

To create a new record in the database, use the create() method:

Creating Records with Rules

To create a new record in the database, use the create() method:

The create method takes an associative array representing the data to be inserted. You can also provide validation rules to validate the data before insertion.

Updating Records

To update an existing record in the database, use the update() method:

The update method takes the ID of the record to be updated and an associative array representing the updated data. Like the create method, you can provide validation rules to validate the data before updating.

Deleting Records

To delete a record from the database, use the delete() method:

The delete method takes the ID of the record to be deleted.

Chaining Methods

You can chain multiple methods together to build complex queries:

In this example, we are using method chaining to build a query. We start by using the where method to specify a condition (age > 18). Then, we use the orderBy method to sort the results by name in ascending order. Next, we use the limit method to limit the number of records to retrieve (in this case, 10). Finally, we call the get method to execute the query and retrieve the results.

The retrieved records are then iterated over in a foreach loop, and the name and email of each user are echoed.

Contributions

Contributions to IJDORM are welcome! If you find any issues or have suggestions for improvements, please create an issue or submit a pull request on the GitHub repository.

License

IJDORM is open-source software licensed under the MIT License. See the LICENSE file for more information.


All versions of ijd-orm with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-mysqli Version *
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 iamjohndev/ijd-orm contains the following files

Loading the files please wait ....