public function getUserGames($userId) { $select = Zend_Db_Table::getDefaultAdapter()->select(); ->where('ug.user_id = ?', $userId); return $this->fetchAll($select); }
ale wywołanie jej kończy się komunikatem:
Cytat
message: sqlstate[42000]: syntax error or access violation: 1064 you have an error in your sql syntax; check the manual that corresponds to your mysql server version for the right syntax to use near '' at line 1
jeśli zamienię $select na $select->assemble(), to komunikat zmienia się na:
Cytat
message: sqlstate[21000]: cardinality violation: 1241 operand should contain 1 column(s)
ktoś może mi wytłumaczyć, o co chodzi?
//edit: zapytanie z assemble() wykonuje się w phpmyadminie bez problemów :/