Download the PHP package peterujah/php-search-controller without Composer

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

PHPSearchController

PHPSearchController is a simple PHP class to search MySQL database, it can build SQL queries to perform MySQL database searches by taking parameters that define database table fields and field values to search.

The class generates SQL conditions used to build SQL queries to perform database searches for records that match the criteria based on the table fields and field values defined by the parameters, It then combines several conditions using SQL operators such as AND, OR, NAND, LIKE NOR & FIND_IN_SET and return the appropriate queries for the search.

Installation

Installation is super-easy via Composer:

Usages

Initialize the class with your preferred search method the default method is SearchController::OR.

Set your preferred search operator the default is SearchController::END_WITH_QUERY.

To perform a database search, you can just build your search query like the one below.

To search by tag using MySQL FIND_IN_SET, build a query like the example below.

Set the initial query and pass the search query to your MySQL connection

OR build it with other sql queries like the below in your MySQL connection

Other Methods

Returns the computed sql search queries by checking if the initial query was specified or not to determine which start clause is needed.

Set your search keyword

Split search keyword Foo Bar into Foo, Bar as separate search terms

Mapping your database column keys to perform a search on

Set the initial SQL query before appending the search after your query string

Reference

Specify search operator $search->setOperators(SearchController::HAVE_ANY_QUERY)

Search Operators Description
START_WITH_QUERY Finds any values that start with "query"
END_WITH_QUERY Finds any values that end with "query"
HAVE_ANY_QUERY Finds any values that have "query" in any position
HAVE_SECOND_QUERY Finds any values that have "query" in the second position
START_WITH_QUERY_2LENGTH Finds any values that start with "query" and are at least 2 characters in length
START_WITH_QUERY_3LENGTH Finds any values that start with "query" and are at least 3 characters in length
START_END_WITH_QUERY Finds any values that start with "query" and ends with "query"

Initialize search class with a method new SearchController(SearchController::OR)

Search Methods Description
OR Retrieve result with any one of search query
AND Retrieve result with the exact of search quer
NAND Retrieve result without the exact search query
NOR Retrieve result without any on of the search query

All versions of php-search-controller with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0 || ^8.0
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 peterujah/php-search-controller contains the following files

Loading the files please wait ...