 |

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:
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
|
|
|  |
|