我有以下代码:
$selectColumns= array('user_id.user_email',
'user_details.first_name',
'user_details.last_name',
'user_details.zip',
'user_details.store_id');
$result = $handle->select()->from('user_id')
->where('uid=?', $uid)
->columns($selectColumns)
->join('user_details', 'user_id.uid = user_details.uid')
->query(ZEND_DB::FETCH_OBJ);
运行后,我收到以下错误:
Uncaught exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: '
Integrity constraint violation: 1052 Column 'uid' in where clause is ambiguous
我一直在试图弄清楚我做错了什么。有什么帮助吗?