I know that this is easy but maybe someone can make it in easier way😉
in footer i add this
is there any way to chceck this without writing table name?
in footer i add this
<p style="padding-top:10px;"> <?php
$sql = "SELECT COUNT(cf_id) FROM jos_chronoforms_YourTable;";
$result = mysql_query($sql);
if(!$result) {
$err=mysql_error();
print $err;
ob_clean();
exit();
}echo("All reservations:". mysql_result($result, 0) . "Â Â ");
$sql = "SELECT SUM(cf_id) FROM jos_chronoforms_YourTable;";
$result = mysql_query($sql);
if(!$result) {
$err=mysql_error();
print $err;
ob_clean();
exit();
}?>
is there any way to chceck this without writing table name?
Hi Qbik,
I don't see how you could do it without writing the table name???
Bob
I don't see how you could do it without writing the table name???
Bob
?
ok and another question about that is there any option to count entry in table in new CC for J2.5?
i can Use my code but where to put it?😟
i can Use my code but where to put it?😟
Hi Qbik,
Try
This may not be valid in future versions though, a new method may be needed.
Regards,
Max
Try
count($table_data);
?This may not be valid in future versions though, a new method may be needed.
Regards,
Max
if it works then it should work in any custom list box, header, body or footer.
ok but i set Auto Listing to yes so to add this "count" stuff i have to disable it yes?
there is no other option to add this?
there is no other option to add this?
Hi Qbik,
Sorry for the late answer, well, you may try to use the "Task Control" to do that, but I'm not sure if it will work, there may be other ways, but they may be testable after the new version hopefully this week, so please contact me again after you install the new version🙂
Regards,
Max
Sorry for the late answer, well, you may try to use the "Task Control" to do that, but I'm not sure if it will work, there may be other ways, but they may be testable after the new version hopefully this week, so please contact me again after you install the new version🙂
Regards,
Max
I added after line 902 of components \ com_chronoconnectivity \ libraries \ chronoconnection.php the statement global $ total
and you can call in header, body, footer with
works well
function list_records($where = '', $first = false, $limited = false, $disable_hierarchies = false){
global $total;
and you can call in header, body, footer with
<?php
global $ total;
echo $total;
?>
works well
ok great but this work only when Auto Listing is set to "no" right?
any solution for Auto Listing set to yes?
any solution for Auto Listing set to yes?
Hi,
In the new V4 RC3, I think that you can do it this way:
#1- setup a task control for the "list data", add the form event name which has the "ChronoConnectivity task" action, and add the action's order number (don't configure the task in Chronoforms).
#2- add a "Custom code" action before the "ChronoConnctivity task" and enter the code below:
That should output the record count above the list.
Regards,
Max
In the new V4 RC3, I think that you can do it this way:
#1- setup a task control for the "list data", add the form event name which has the "ChronoConnectivity task" action, and add the action's order number (don't configure the task in Chronoforms).
#2- add a "Custom code" action before the "ChronoConnctivity task" and enter the code below:
<?php
$MyConnection =& CFChronoConnection::getInstance("Connection_NAME");
$MyConnection->list_records();
echo $MyConnection->pageNav->total;
?>
That should output the record count above the list.
Regards,
Max
?
It take me a long time but i tried one more time and i dont know how to set this corectly can You help me with that?
I can send you mine CC - exported table
Or you can write exactly where to write what
E.g. In front editing tab
Ok I understand that I have to add ChronoConnectivity task (but what is that exactly)
List data task control
Can You write me step by step how to set this, thx in advance
I can send you mine CC - exported table
Or you can write exactly where to write what
E.g. In front editing tab
Ok I understand that I have to add ChronoConnectivity task (but what is that exactly)
List data task control
Can You write me step by step how to set this, thx in advance
Hi Qbik,
There is a simple tutorial on task control on our FAQs page, if its hard, then you may simply run a custom count query on the list page and echo the total result.
Regards,
Max
There is a simple tutorial on task control on our FAQs page, if its hard, then you may simply run a custom count query on the list page and echo the total result.
Regards,
Max
This topic is locked and no more replies can be posted.