Download the PHP package celiovmjr/simplequery without Composer
On this page you can find all versions of the php package celiovmjr/simplequery. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download celiovmjr/simplequery
More information about celiovmjr/simplequery
Files in celiovmjr/simplequery
Package simplequery
Short Description Streamlined SQL Queries Made Simple
License MIT
Informations about the package simplequery
SimpleQuery
A PHP class SimpleQuery
designed for building SQL queries and interacting with a database using PDO.
Table of Contents
- Introduction
- Features
- Installation
- Usage
- Creating an Instance
- Setting and Getting Data
- Executing Queries
- CRUD Operations
- Contributing
- License
Introduction
The SimpleQuery
class provides a fluent interface for constructing SQL queries dynamically. It supports basic CRUD operations (Create, Read, Update, Delete) and facilitates parameter binding, making database interactions secure and efficient.
Features
- Fluent interface for building SQL SELECT, INSERT, UPDATE, and DELETE queries.
- Parameter binding to prevent SQL injection attacks.
- Supports fetching results as arrays or objects.
- Easy setup and integration with existing PDO connections.
- Handles table joins, WHERE conditions, ORDER BY clauses, LIMIT, and OFFSET.
Installation
To use the SimpleQuery
class, ensure you have PHP 8.1+ and PDO extension installed. Simply include or autoload the class file in your project:
Usage
Creating an Instance
Create a new instance of SimpleQuery
by passing an initialized PDO connection:
Setting and Getting Data
You can set data to be used in queries using magic methods (__set
, __get
, __isset
, __unset
), array conversion methods (fromArray
, toArray
), or object conversion methods (fromObject
, toObject
):
Executing Queries
Build and execute queries using fluent methods:
CRUD Operations
Perform CRUD operations easily:
Contributing
Contributions are welcome! Feel free to open issues or pull requests for any improvements or fixes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
All versions of simplequery with dependencies
ext-pdo Version *