Showing this error when using more then one join

SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘title’ in where clause is ambiguous

can you help me:

if (!$this->validate()) {

// uncomment the following line if you do not want to any records when validation fails

// $query->where(‘0=1’);

return $dataProvider;


$query ->joinWith(‘location’);

$query ->joinWith(‘programCategory’);

$query ->joinWith(‘duration’);

$query ->joinWith(‘airport’);


‘program_id’ => $this->program_id,


$query->andFilterWhere([‘like’, ‘title’, $this->title])

->andFilterWhere([‘like’, ‘’, $this->location_id])

->andFilterWhere([‘like’, ‘program_category.program_category_name’, $this->category_id])

->andFilterWhere([‘like’, ‘duration.type’, $this->duration_id])

->andFilterWhere([‘like’, ‘’, $this->airport_id]);

return $dataProvider;


In join u have to specity table name with attributes.

if "title" is related to post table then u have to write post.title.

if field names of title is in two tables, plz denote the which table you have to search,


$query->andFilterWhere(['like', 'tablename_1.title', $this->title])