Download the PHP package hindbiswas/quebee without Composer

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

QueBee: A PHP SQL Query Builder

Project Language Project Type Stable Version Latest Version Maintained License PRs Welcome

Introduction

The QᴜᴇᴇBᴇᴇ (QB) or Query Builder package is a lightweight package for Building MySQL Queries. It is a PHP package that simplifies the construction of SQL queries. It provides an object-oriented approach to building SQL queries, making it easier to create, modify, and execute SQL statements in your PHP applications.

Installation

1. Composer

QueBee can be installed via Composer, a PHP dependency manager. If you haven't installed Composer yet, visit composer's website for instructions.

Run the following command to install QueBee:

2. Autoloading

Ensure that Composer's autoloader is included in your project's PHP files. Use your path in place of path/to/:

Features

QueBee provides following features to work with MySQL:

  1. Queries: Query class for SELECT, INSERT, UPDATE, and DELETE queries.
  2. Table: Table class for CREATE TABLE along with Col class for columns.
  3. Columns: Col class has a bunch of datatypes like INT, VARCHAR, DATETIME and many more for creating columns as per your requirements.
  4. Statements: Stmt class for UNION, UNION ALL, CUBE, SET, and GROUPING SETS statements.

It also includes foreign key constraints, unique, primary key and indexing as well as grouping. See the /tests/ directory for all possible ways of using the QueBee;

Usage

Below are examples of how to use each query builder.

1. SELECT Query

To create a SELECT query, use the Query::select() method:

Or,

condition aliases for conditional statements

SQL Literal Symbolic
> gt >
>= gte >=
< lt <
<= lte <=
= eq == or =
!= ne != or <>
<=> ns <=>
LIKE like ??

You can use either Literal or Symbolic.

2. INSERT Queries

To create an INSERT query, use the Query::insert() method (To insert multiple rows at once, use the Query::insertMultiple() method):

3. UPDATE Queries

To create an UPDATE query, use the Query::update() method:

4. DELETE Queries

To create a DELETE query, use the Query::delete() method:

5. CREATE TABLE Queries

To create a CREATE TABLE query, use the Table::create() method:

Without Any Foreign Keys

With Foreign Keys

Available Data Types as of v1.2.0

Best Practices

Here are some best practices when using QueBee:

  1. Sanitize User Inputs: Always sanitize user inputs before using them in queries.

  2. Error Handling: Handle exceptions appropriately, especially when building queries. QueBee can throw exceptions for invalid input or method calls.

  3. Database Abstraction: Consider using a database abstraction layer alongside QueBee for more extensive database interactions.

  4. Code Organization: Organize your code logically, separating query building from execution and result handling.

Conclusion

QueBee simplifies SQL query construction in PHP, making it easier to build clean, secure, and efficient database interactions. With its fluent API, it provides a user-friendly way to create SQL queries for various database systems.

For more detailed usage and customization options, refer to the QueBee GitHub repository.

That's it! You're ready to start using QueBee for building SQL queries in your PHP applications.


All versions of quebee with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 hindbiswas/quebee contains the following files

Loading the files please wait ....