mysql - An error with the LIKE clause -


if(!empty($count)){   $battingquery->where('countries_id', 'like', '%'.$count.'%'); } 

i running query yield problem, if run search on country id 11, 12, 13, 14; country_id of 1 aswell 11 example. how make equals? both '=' , equals return nothing , break query.

the query builder has useful where clauses.

$count = 13; if(!empty($count)){   $battingquery->where('countries_id', $count); } 

this return models countries_id equal 13


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -