Actually I have narrowed it down to the ajax i think.

I can call the method in the model and it works fine.  However when I call
the action via ajax it leaves out the orWhere loop.

Seems odd to me.

On Sat, Oct 24, 2009 at 6:33 PM, Hector Virgen <djvir...@gmail.com> wrote:

> What is the error? If you can echo the SQL but not query it, it's probably
> a syntax error.
>
> --
> Hector
>
>
>
> On Sat, Oct 24, 2009 at 1:26 PM, Shaun Farrell <farrel...@gmail.com>wrote:
>
>> Are you able to do this?
>>
>> $teamTags = an array or strings
>>
>>         $select = $this->getTable()->select();
>>
>> foreach($teamTags as $tags) {
>>             $select->orWhere('Text like ?', '%' . $tags['Tag'] . '%');
>>         }
>>
>>         $select->where('(Create_Dt < ?', '2009-10-24 23:59:59')
>>             ->where('Create_Dt > ?)', '2009-10-24 00:00:01')
>>             ->order('Id DESC')
>>             ->limit(10);
>>
>>         $result = $this->getTable()->fetchAll($select);
>>
>> If you echo the $select it's fine.
>> if you try to do fetchAll() it doesn't work.
>>
>> any thoughts?
>>
>> --
>> Shaun J. Farrell
>> Washington, DC
>> (202) 713-5241
>> www.farrelley.com
>>
>
>


-- 
Shaun J. Farrell
Washington, DC
(202) 713-5241
www.farrelley.com

Reply via email to