Category Quickie!

2 posts by 2 authors in: Forums > CMS Builder
Last Post: March 30, 2010   (RSS)

Re: [Perchpole] Category Quickie!

By Jason - March 30, 2010

Hi,

First, we need to set up a database query:

<?php
list($categoryRecords,$categoryMetaData)= getRecords(array(
'tableName' => 'category',
'where' => 'num='.$selectedCategoryNum,
'limit' => '1'
));
?>

You may have to change the tableName depending what you call the category table.

Then, you can use this code anywhere below that query:
<?php echo "<h2>".$categoryRecords[0]['title']."</h2>"; ?>

Again, you may need to change the word "title" depending on what the field is called in you database. You can also changed the HTML to format it however you want.

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/