PHP Query Builder

Open-source PHP projects categorized as Query Builder

Top 10 PHP Query Builder Projects

Query Builder
  • Cycle ORM

    PHP DataMapper, ORM (by cycle)

    Project mention: Cash: A small jQuery alternative for modern browsers | news.ycombinator.com | 2024-11-02

    Thanks. It's a small custom framework built from libraries, some custom, some third party.

    - File based HTTP router running on top of https://frankenphp.dev/

    - ORM/SQL with: https://github.com/cycle/orm but this is preference. Anything works. From SQL builders to ORMs.

    I'll try to explain their form handling:

    Forms almost always POST to their own GET URL.

    If you GET /user/save you'll get back HTML and `` to build the form.<p>If you POST /user/save you're expected to pass the entire form data PLUS an "operation" parameter which is used by the backend to decide what should be done and returned.<p>For example if user clicks [add new user] button, the "operation" parameter has value of "btnNewUser.click".<p>Why pass operation parameter? Because business forms can have more than just a [submit] button.<p>For example, there might be a datagrid filter value being changed (operation: "txtFilter.change"), or perhaps a dropdown search to select a city name from a large list (operation: "textCitySearch.change"), it can be a postal code to address lookup (operation: "txtPostalCode.change"), etc.<p>On the backend, the pseudocode looks somewhat like this but it's cleaner/safer because of encapsulation, validation, error handling, data sanitization, model binding and csrf/xss protection:<p><pre><code> function user_save($operation) {

  • Cloudways

    Cloudways' Black Friday Offer - 1st Choice of Developers. Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.

    Cloudways logo
  • laravel-eloquent-query-cache

    Adding cache on your Laravel Eloquent queries' results is now a breeze.

  • Aura.SqlQuery

    Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.

  • db

    Yii Database Library (by yiisoft)

  • PdoOne

    It is a simple library for PHP that simplify the use of the PDO extension.

  • DB

    Simple PHP Query Builder class (by mareimorsy)

  • to-raw-sql

    Get raw SQL from Laravel Query Builder and Eloquent Builder

  • CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  • pecee-pixie

    Lightweight, easy-to-use querybuilder for PHP inspired by Laravel Eloquent - but with less overhead.

  • laravel-cycle-orm-adapter

    🔥 A Laravel adapter for CycleORM, providing seamless integration of the Cycle DataMapper ORM for advanced database handling and object mapping in PHP applications.

    Project mention: Laravel Config Problem: Is It Time for a Revolution? | dev.to | 2024-07-17

    I use this approach in my wayofdev/laravel-cycle-orm-adapter package. The configuration file can be viewed here: config/cycle.php

  • sequel-mongo-php

    Run SQL-like queries on MongoDB databases!

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

PHP Query Builder discussion

Log in or Post with

PHP Query Builder related posts

  • A simple code to automate prepared statements for SQL code. Hope will help someone.

    1 project | /r/PHP | 29 Dec 2020

Index

What are some of the best open-source Query Builder projects in PHP? This list will help you:

Project Stars
1 Cycle ORM 1,237
2 laravel-eloquent-query-cache 1,062
3 Aura.SqlQuery 450
4 db 134
5 PdoOne 108
6 DB 106
7 to-raw-sql 54
8 pecee-pixie 41
9 laravel-cycle-orm-adapter 24
10 sequel-mongo-php 9

Sponsored
Cloudways' Black Friday Offer - 1st Choice of Developers
Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.
platform.cloudways.com