We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Multiple left joins in phalcon 2.0.10

Hi Team, In below query i am getting notice Notice: Cannot use a scalar value as an array

$data = table1::query()
    ->columns("table1.id,apikey,table2.title as sTitle, table3.title as aTitle")
    ->leftjoin("table3", "table1.id=table3.channel_id")
    ->leftjoin("table2", "table1.id=table2.channel_id")
    ->where("table1.id= " . $Id ." ")
    ->execute();

could you please help me here?

Thanks, Amol

Use binding:

->where("table1.id= :id:", ['id'=>$Id])