I have the following:

it keeps erroring saying: SQLSTATE[42S22]: Column not found: 1054 Unknown
column 'round_number' in 'where clause'

So how do I tell the where clause the correct table

            $table = new sites_models_Scores();

            $select = $table->select()->setIntegrityCheck(false);
            $select->where('round_number >= ?',
$this->_getParam('startRound'))
                   ->where('round_number <= ?',
$this->_getParam('endRound'))
                   ->joinLeft('users', 'scores.user_id = users.user_id',
'screen_name');

            $rowSet = $table->fetchAll($select);
            $result = $rowSet->toArray();


the example in the docs has - i dont really see the difference.

$table = new Bugs();


$select = $table->select()->setIntegrityCheck(false);

$select->where('bug_status = ?', 'NEW')

       ->join('accounts', 'accounts.account_name = bugs.reported_by',
'account_name')

       ->where('accounts.account_name = ?', 'Bob');


$rows = $table->fetchAll($select);

Reply via email to