@@ -49,10 +49,10 @@ $search->setTags("code_tags");
49
49
Set inital query and pass search query to your mysql connection
50
50
51
51
``` php
52
- $search->setSQLQuery ("SELECT * FROM code WHERE id = 1323");
53
- $db->conn()->prepare($search->getAndQuery ());
52
+ $search->setIniQuery ("SELECT * FROM code WHERE id = 1323");
53
+ $db->conn()->prepare($search->getQuery ());
54
54
$db->conn()->execute();
55
- $resault = $db->conn()->getAll();
55
+ $result = $db->conn()->getAll();
56
56
$db->conn()->free();
57
57
```
58
58
OR bulid it with other sql query like below in your mysql connection
@@ -63,7 +63,7 @@ $db->conn()->prepare("
63
63
AND id = 1323
64
64
");
65
65
$db->conn()->execute();
66
- $resault = $db->conn()->getAll();
66
+ $result = $db->conn()->getAll();
67
67
$db->conn()->free();
68
68
```
69
69
@@ -74,16 +74,31 @@ Returns the computed sql search queries by checking if initial query was specifi
74
74
$search->getQuery()
75
75
```
76
76
77
- Returns the computed search queries by using ` AND ` as the start clause.
77
+ Set your search keyword
78
+
79
+ ``` php
80
+ $search->setQuery("Foo Bar")
81
+ ```
82
+
83
+ Split search keyword ` Foo Bar ` into ` Foo ` , ` Bar ` as separate search terns
78
84
``` php
79
- $search->getAndQuery ()
85
+ $search->split ()
80
86
```
81
- Returns the computed search queries by using ` WHERE ` as the start clause.
87
+
88
+ Mapping your database column keys to perform search on
89
+
90
+ ``` php
91
+ $search->setParameter(array)
92
+ ```
93
+
94
+
95
+ Set initial SQL query before appending search after your query string
96
+
82
97
``` php
83
- $search->getWhereQuery( )
98
+ $search->setIniQuery('SELECT * FROM ...' )
84
99
```
85
100
86
- # Refrence
101
+ # Reference
87
102
88
103
Specify search operator ` $search->setOperators(SearchController::HAVE_ANY_QUERY) `
89
104
@@ -98,7 +113,7 @@ Specify search operator `$search->setOperators(SearchController::HAVE_ANY_QUERY)
98
113
| START_END_WITH_QUERY | Finds any values that start with "query" and ends with "query" |
99
114
100
115
101
- Initalise search class with a method ` new SearchController(SearchController::OR) `
116
+ Initialize search class with a method ` new SearchController(SearchController::OR) `
102
117
103
118
| Search Methods | Description |
104
119
| ------------------------| -------------------------------------------------------------------------------------|
0 commit comments