File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -50,19 +50,39 @@ Set inital query and pass search query to your mysql connection
5050
5151``` php
5252$search->setSQLQuery("SELECT * FROM code WHERE id = 1323");
53- $db->conn()->prepare($search->getQuery ());
53+ $db->conn()->prepare($search->getAndQuery ());
5454$db->conn()->execute();
5555$resault = $db->conn()->getAll();
5656$db->conn()->free();
5757```
5858OR bulid it with other sql query like below in your mysql connection
5959``` php
60- $db->conn()->prepare("SELECT * FROM code " . $search->getQuery() . " AND id = 1323");
60+ $db->conn()->prepare("
61+ SELECT * FROM code
62+ {$search->getWhereQuery()}
63+ AND id = 1323
64+ ");
6165$db->conn()->execute();
6266$resault = $db->conn()->getAll();
6367$db->conn()->free();
6468```
6569
70+ # Other Methods
71+
72+ Returns the computed sql search queries by checking if initial query was specified or not to determine which start clause is needed.
73+ ``` php
74+ $search->getQuery()
75+ ```
76+
77+ Returns the computed search queries by using ` AND ` as the start clause.
78+ ``` php
79+ $search->getAndQuery()
80+ ```
81+ Returns the computed search queries by using ` WHERE ` as the start clause.
82+ ``` php
83+ $search->getWhereQuery()
84+ ```
85+
6686# Refrence
6787
6888Specify search operator ` $search->setOperators(SearchController::HAVE_ANY_QUERY) `
You can’t perform that action at this time.
0 commit comments