0

Well i am new to yii framework i need to execute subquery like below-

(select concat(cp.id,'|',campp.prosjektkode,'|',cp.kunder_id) 
    from campaign_company cp 
       left join campaign campp  
          on cp.campaign_id= campaign.id 
    where cp.id<c1.id limit 1) as prev

problem is yii2 is looking for column with name of '|' and error given like -

SQLSTATE[42703]: Undefined column: 7 ERROR: column "|" does not exist

suggest me what to right here...

Thanks in advance

Veshraj Joshi
  • 3,544
  • 3
  • 27
  • 45
  • 3
    The error message suggests that you are using double quotes `"|"` instead of the correct single quotes: `'|'` - are you sure that query in your question is **exactly** what you use in your application? –  Nov 28 '16 at 12:30
  • 1
    show all the code not only the (select..) please – ScaisEdge Nov 28 '16 at 12:30

0 Answers0