Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions includes/ezsql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# ezSQL Library

## Overview
This directory contains the ezSQL library, a PHP class that simplifies database interactions. Created by Justin Vincent, ezSQL provides an abstraction layer to work seamlessly with databases such as MySQL, Oracle, PostgreSQL, SQLite, and MS-SQL.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overview claims this ezSQL copy supports PostgreSQL and MS-SQL, but this repository’s includes/ezsql/ only contains modules for mysql/, oracle8_9/, and sqlite/ (no postgres/mssql drivers). Please update this sentence to list only the database modules that are actually shipped here to avoid misleading readers.

Suggested change
This directory contains the ezSQL library, a PHP class that simplifies database interactions. Created by Justin Vincent, ezSQL provides an abstraction layer to work seamlessly with databases such as MySQL, Oracle, PostgreSQL, SQLite, and MS-SQL.
This directory contains the ezSQL library, a PHP class that simplifies database interactions. Created by Justin Vincent, ezSQL provides an abstraction layer to work seamlessly with databases such as MySQL, Oracle, and SQLite.

Copilot uses AI. Check for mistakes.

## Features
- Simplified database connection handling
- Supports multiple database types
- Query execution and result handling
- Debugging capabilities
- Data caching

## Usage
Include the ezSQL library in your project by referencing it in your PHP files:
```php
include_once 'ez_sql.php';
```
Create a new database object for interactions:
```php
$db = new db(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
```
Comment on lines +14 to +21
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The usage example doesn’t match how ezSQL is actually structured/used in this repo: there is no ez_sql.php file here, and the DB classes are ezSQL_mysql, ezSQL_oracle8_9, ezSQL_sqlite, etc. (see includes/db.php and the includes/ezsql/*/demo.php scripts). Please adjust the include and instantiation examples to reference shared/ez_sql_core.php plus the appropriate DB-specific driver, and construct the correct class (e.g., new ezSQL_mysql(...)).

Copilot uses AI. Check for mistakes.
Execute queries using the provided methods, such as `get_results()`, `get_row()`, `get_var()`, and others.

## Debugging
Enable debugging to track SQL queries and their results in your scripts:
```php
$db->debug_all = true;
```
Control debug output with `vardump()` and `debug()` methods for customized handling.

## Contribution
Please email Justin Vincent at [justin@visunet.ie](mailto:justin@visunet.ie) with feedback or for contributing to the project. Consider making a donation to support further development.

## License
This library is licensed under LGPL. You are free to utilize and modify ezSQL as required for your projects.