mercredi 30 juin 2021

Special Characters and Searches with Laravel elequant

The issue I am having is with Special Characters. Search with the inputs %(Modular), __(_Underscore), O(Number). It will not filter out any result. it will display all the results. Where as searching templates having other special characters and number displaying correct results.

If in the DB I have subject of myname is % user, and the users search input is %, it doesn't find the result. Same with__(_Underscore), O(Number).

($searchkeyword) {
                    $q->where(function($query) use ($searchkeyword) {
                        $query->where('studentname', 'like', "%$searchkeyword%")
                        ->orWhere('subject', 'like', "%$searchkeyword%")
                        ->orWhere('city', 'like', "%$searchkeyword%");
                    });
                })


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire