Skip to content

PHP code snippet – How to concat in where clause like laravel query builder?

$query = DB::table('mbo_party')->where(DB::raw("CONCAT(first,' ',last)"), 'LIKE', '%' . $party_name . '%')->first();
See also  CSS code snippet - How to clear floats?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.