Search results only find record num 1

4 posts by 2 authors in: Forums > CMS Builder
Last Post: July 22, 2011   (RSS)

By markr - July 21, 2011

I have a search form doing a keyword search on several fields but it is not finding records that it should. It is only finding keywords in record number 1.

I am using the following clause on the listPage to only show future events...

'where' => 'eventDate > NOW()',

Is this causing the problem? It appears to work for the list page but is this not well-formed?

Re: [markr] Search results only find record num 1

By Jason - July 21, 2011

Hi,

Would you be able to attach the .php page you're working with so we can take a look at your code?

thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [markr] Search results only find record num 1

By Jason - July 22, 2011

Hi,

I took a look and I don't see anything immediately wrong. Something we can try to help pin point the issue is to use the:
'debugSql' => true,

option in getRecords() like this:

// load records
list($calendarRecords, $calendarMetaData) = getRecords(array(
'tableName' => 'calendar',
'perPage' => '30',
'where' => 'eDate > NOW()',
'debugSql' => true,
));


This will output the actual mysql query that is being executed. If you could run a search with this option enabled and post your results, we can take a look at that.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/