Cake php结合查询条件

时间:2014-05-01 18:18:37

标签: mysql cakephp

我需要将以下查询更改为蛋糕php查询格式可以在这里任何人指导我

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

1 个答案:

答案 0 :(得分:2)

试试这个

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