user277775
user277775

Reputation: 1

Cake php combine query condition

I need to change the following query to cake php Query format can any one here can guide me

select Address1 + ' ' + Address2 as CompleteAddress from YourTable 
where Address1 + ' ' + Address2 like '%YourSearchString%'

Upvotes: 0

Views: 69

Answers (1)

echo_Me
echo_Me

Reputation: 37233

try this

   select Concat(Address1 ,' ', Address2) as CompleteAddress from YourTable 
   where Concat(Address1,' ',Address2) like '%YourSearchString%'

Upvotes: 2

Related Questions