![](/img/trans.png)
[英]MySQL - How to get the difference of all the rows in a column within a specific “id”?
[英]How can i quickly search a specific id and get all rows of that id in a large database in Laravel with mysql?
我正在Laravel中制作結果發布系統應用程序。 我正在MYSQL數據庫中導入大量結果(如1000000)的學生。 學生可以按角色編號和注冊編號搜索結果。 我將提供兩個輸入,然后需要搜索整個結果數據庫並查找學生的結果。我應該如何搜索結果,以便很快找到搜索結果。 謝謝
<div class="btn-group">
<formclass="forminline" action="{{URL::to('searchEmployie')}}" method="get">
<div class="form-group">
<input type="text" name="search" class="form-control" id="search" placeholder="{{ trans('app.search_for_action')}}" value="{{Request::get('search')}}">
<button type="submit" class="btn btn-outline btn-default"><i class="icon fa-search" aria-hidden="true"></i></button>
@if (Request::get('search') != '')
<a href="{{URL::to('employie')}}" class="btn btn-outline btn-danger" type="button"><i class="icon fa-remove" aria-hidden="true"></i>
</a>
@endif
</div>
</form>
</div>
controller
$q = Input::get('search');
$employie = Employie::where('employee_name', 'LIKE', '%' . $q . '%')->paginate(2);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.