DeWebDude
|
Posted: 09/12/2003, 4:53 AM |
|
Using CC, and PHP I am trying to display how many records match the result of a query. Not trying to do paging etc, but to display something like
Search of "whatever" returned 50 Matches, which is how many records will be displayed ( not looking for paging).
In the manual I found sCountSQL but no example on how to display it, and could not get the result to display.
Thanks!!
|
|
|
No Name
|
Posted: 09/12/2003, 7:31 AM |
|
All is generic except one line and that one is easy to convert to any other script language.
In Form Properties Header&Footer:
Current search: <b><font color ="red">{RecsFound}</font></b> items.
in Open Events (for the total in a database):
'==================================
' Count of found records
'----------------------------------
fResult = dResult * iRecordsPerPage
SetVar "RecsFound", fResult ' VBScript
in Before Show Events (for a total on a search/filter):
'==================================
' Count of found records
'----------------------------------
fResult = dResult * iRecordsPerPage
SetVar "RecsFound", fResult ' VBScript
|
|
|
DeWebDude
|
Posted: 09/12/2003, 2:46 PM |
|
I tried putting this in before show
$fldRecsFound = $fResult = dResult * iRecordsPerPage;
And {RecsFound} still displays nothing.
I also tried these crazy things... nothing gives me a value...
<? echo {RecsFound}; echo "Jack";echo RecsFound; echo $RecsFound; ?>
{RecsFound}
$RecsFound
$fldRecsFound
( PHP & CC )
Please help.... Thanks!
|
|
|
No Name
|
Posted: 09/13/2003, 8:37 PM |
|
Look into the project file for the Forum example that comes with CC. It also shows the code for counting reply records in PHP.
|
|
|
|