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 Jason - February 7, 2011

Hi Kenny,

How would you want this feature to work? What would happen if a user had fewer than the Minimum number of records?

If it's a matter of figuring out how many records you're working with at run time, you could use the php count() function.

For example:

<?php
$recordsReturned = count ($listingsRecords);
?>


You can then test this value to make sure it falls within the range you want.

Would this accomplish what you need?

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/

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