Listing by letters of the alphabet

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 26, 2008   (RSS)

Re: [richo] Listing by letters of the alphabet

By Dave - May 26, 2008

John, welcome to the CMS Builder forum! :)

That's a bit more of an advanced request, but you can do it with a MySQL WHERE statement like this: title LIKE "a%"

So you can either add that in the code generator or to the code itself like this:

list($newsRecords, $newsDetails) = getRecords(array(
'tableName' => 'news',
'perPage' => 3,
'where' => 'title LIKE "a%"',
));


Hope that helps! Let me know if you need more details.
Dave Edis - Senior Developer
interactivetools.com