Forums

how to get the total number of data insert in a table

kayrie 17 Oct, 2011
how can i make a count list....
such as i had 5 saved form in a database...
so in chronoconnectivity it will shown value 5

Details Hit
1)Form apply 5
GreyHead 17 Oct, 2011
Hi Kayrie,

The easiest way is to add this code>

a) In the header box
<?php
global $count;
?>

b) In the body box:
<?php
global $count;
$count++;
?>

c) In the footer box
There are <?php echo $count; ?> records.

Bob
kayrie 18 Oct, 2011
Hye bob,

what means by $count?
because i added this code but nothing happen..
GreyHead 21 Oct, 2011
Hi Kayrie,

$count is a temporary variable to count the number of results. Isn't that what you wanted?

Bob
kayrie 24 Oct, 2011
but it turn out an empty result....
GreyHead 24 Oct, 2011
HI Kayrie,

Sorry, I missed a line from the body box. It should be
<?php
global $count;
$count++;
?>

Bob
This topic is locked and no more replies can be posted.