Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Listing by letters of the alphabet

 

 


richo
Novice

May 26, 2008, 3:45 AM

Post #1 of 2 (155 views)
Shortcut
Listing by letters of the alphabet Can't Post

I am a new user of CMS Builder and just getting used to it. It's an excellent product.

I have used the php code to list my data but how can I display all records in the title field that begin with the letter A for example. I want to create a different php page for each letter of the alphabet.

Hope you can help. Many thanks.

John


Dave
Staff / Moderator


May 26, 2008, 9:13 AM

Post #2 of 2 (131 views)
Shortcut
Re: [richo] Listing by letters of the alphabet [In reply to] Can't Post

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:


Code
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

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4