is 'visible' a keyword?

I have a field named ‘visible’,when i added this to condition,system will threw a error:

Integrity constraint violation: 1052 Column ‘visible’ in where clause is ambiguous

:




Products::model()->sTitle($_POST['title'])->with(array(

'items'=>array('condition'=>'visible=1'),

))->findAll();



if i change ‘visible’ to ‘visibled’ in the data table,and change condition ‘visible’ to ‘visibled’,it’s will be ok.




Products::model()->sTitle($_POST['title'])->with(array(

'items'=>array('condition'=>'visibled=1'),

))->findAll();



is ‘visible’ a system keyword?

i can not change data table field name,can i use ‘visiable’ on other ways?

Thank you!

I don’t know if it’s a reserved keywords or something, but you can use any reserved keyword when you write the table name like this:


'condition' => '`visible`=1'

Probably, your products and items tables both have column "visible".

yes,you are right,i looked,table product and items both have ‘visible’.

how can i solve this problem?

Please!

hi,i solved this problem.

like this:


'items'=>array('condition'=>'items.visible=1'),