Search by

silvaleal / rotyquery

silvaleal

roty-query provides a simple, fluent API to build SQL queries without writing raw SQL by hand.

Package info

github.com/silvaleal/roty-query

pkg:composer/silvaleal/rotyquery

Statistics

Installs: 60

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.0.9 2026-10-29 14:56 UTC

This package is auto-updated.

Last update: 2026-10-29 14:58:44 UTC


README

A lightweight SQL Query Builder for PHP.

roty-query provides a simple, fluent API to build SQL queries without writing raw SQL by hand. It is part of RotyPHP, an ORM for PHP, and works as the query-building foundation behind it.

⚠️ This project is under active development. The API may change between releases.

Requirements

Installation

composer require silvaleal/rotyquery

Usage

use RotyQuery\ModelBase;

require __DIR__ . '/vendor/autoload.php';

$query = new ModelBase();
$query->q_setTable("user");
$query->q_select();
$query->q_where('role', 'user');

echo $query->q_builder(); // SELECT * FROM user WHERE role = :role

Examples

More complete examples are available in the examples directory:

Documentation

Learn how to use RotyPHP by reading our documentation by clicking here.