You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-14Lines changed: 26 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# PHPSearchController
2
2
3
-
PHPSearchController is a simple php class to search mysql database,
3
+
PHPSearchController is a simple php class to search mysql database, it can build SQL query to perform MySQL database searches by takeing parameters that define database table fields and field values to search.
4
+
5
+
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 combine several conditions using SQL operators such as `AND, OR, NAND, LIKE NOR & FIND_IN_SET` and return the appropriate queries for the search.
4
6
5
7
## Installation
6
8
@@ -9,31 +11,41 @@ Installation is super-easy via Composer:
9
11
composer require peterujah/php-search-controller
10
12
```
11
13
14
+
# Usages
15
+
16
+
Initialize the class with your preferred search method the default method is `SearchController::OR`.
12
17
```php
13
18
use Peterujah\NanoBlock\SearchController;
14
-
$search = new SearchController(SearchController::OR);
19
+
$search = new SearchController();
20
+
```
21
+
22
+
23
+
Set your preferred search operator the default is `SearchController::END_WITH_QUERY`.
0 commit comments