-
Notifications
You must be signed in to change notification settings - Fork 15
Function buildSearch
Taufik Firmansyah edited this page Jan 29, 2015
·
4 revisions
This function used for filtering/search rows . using $_GET method with 'search' as get params via url browser . so if your url contain ?search= then function will automatic collect info from get value .
Example Usage
if browser url tell address
http://yourapp/yourmodule?search=FirstName:mario
then if you catch using buildSearch() function it will formating as following code
$filter= $this->buildSearch();
// result will be like
" AND FirstName REGEXP 'mario' "
Adding conditional statment
Now what about if you want to add fixed filter into your query ? you can append current $filter .
$filter .= " AND Status = 'mario' ";
Module Structure
- [controller] (https://github.com/mangopik/Sximo-Laravel/wiki/Controller)
- Model
- views
BaseController
- [Function getDownload()] (https://github.com/mangopik/Sximo-Laravel/wiki/function-getDownload%28%29)
- Function trackUriSegment()
- [Function getComboselect()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-getComboselect)
- [Function validatePost()] (https://github.com/mangopik/Sximo-Laravel/wiki/function-validatePost)
- [Function validateForm()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-validateForm)
- [Function validAccess()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-ValidAccess)
- [Function inputLogs()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-inputLogs)
- [Function buildSearch()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-buildSearch)
- [Function masterDetailParam()] (#)
BaseModel
- [Function makeInfo()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-makeInfo)
- [Function getRows()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-getRows)
- [Function getRow()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-getRow)
- [Function insetRow()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-insertRow)
SiteHelpers
- [Function avatar()] (#)
- [Function alert()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-alert)
- [Function encryptID()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-encryptID)
- [Function gridDisplay()] (#)
- [Function langOption()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-langOption)