Can anyone tell me what's wrong with the 'andWhere' part of this query? What am I doing wrong in the 'andWhere' part of this query? I've tried a variety of different ways of doing it but nothing seems to work... It just seems to be ignored. Does anyone know the proper way I should be doing it?

foreach($entryIds as $entryId) {
    $data[] = craft()-&gt;db-&gt;createCommand()
    -&gt;select('*')
    -&gt;from('amforms_content')       
    -&gt;where(array(
            'elementId' =&gt; $entryId
    ))
    -&gt;andWhere('dateCreated &gt; 2017-02-11')
    -&gt;queryAll();
}

return array($data);
The syntax for comparing a date should be:

-&gt;andWhere('dateCreated &gt; "2017-02-11"')