Maintain Min amount of records in table and total records

4 posts by 3 authors in: Forums > CMS Builder
Last Post: February 7, 2011   (RSS)

By Twocans - February 5, 2011

hello,

I see you guys have a Max Records Field

Admin > Section Editors > Advanced> Max Records

It would be really great were you to add a Minimum Records also.

Take for example

http://216.119.114.156/elevator-panel.php

I have a few of these panel types which I got from pvii, they work very well with your cms. In the example above I would want to make sure my user always had a minimum of 1 record.

So it would be really great were the cms had a function of setting the "Minimum Records" and also been able to call a variable for the "Total Records in table" .

Cheers

kenny

Re: [twocans] Maintain Min amount of records in table and total records

By gkornbluth - February 5, 2011 - edited: February 5, 2011

Hi Kenny,

This short recipe from my CMSB Cookbook http://www.thecmsbcookbook.com might help to get you started.

WANT TO SHOW A RECORD COUNT ON YOUR WEB PAGE

You can use this to see the total number of records displayed:

<?php echo $your_table_nameMetaData['totalRecords']; ?>

There's a few other variables that can be used besides “totalRecords” as well, you can list them all with this code:

<xmp><?php print_r($your_table_nameMetaData); ?></xmp>
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [twocans] Maintain Min amount of records in table and total records

By Twocans - February 7, 2011

Thank you both very much for your excellent replies.

I will purchase the cookbook next week.

regards

Kenny