Gossamer Forum
Home : Products : DBMan : Customization :

please help with record count for HTML

Quote Reply
please help with record count for HTML
Please help.



I am using the following code below in my db.cgi file for record count. I have the record count displaying on all my screens fine. But how can I have it display the record count on a regular HTML file, maybe on a different server?

Thanks for any help.

Eddie

http://ai4uk.netfirms.com/






sub num_records {
# Displays number of records

my $count = 0;
open (DB, "<$db_file_name") or &cgierr("error in num_records. unable to open dat abase:$db_file_name.\nReason: $!");
LINE: while (<DB> ) {
if (!(/^#/) && !(/^\s*$/)) {
$line = $_;
chomp ($line);
@fields = &split_decode ($line);
++$count;
}
}
close DB;
print $count;



Quote Reply
Re: [ai4uk] please help with record count for HTML In reply to
You could display the count on your static pages using SSI, but this would only work on the server where you database is located.

There are examples in the FAQ under the section for "SSI".
I'm not sure this would do you much good on the netfirms server as they don't allow the use of SSI or #exec cmd.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] please help with record count for HTML In reply to
http://surfershome.com had a script which would do what you want. It was a cgi script which allows you to post pages from others servers onto your server. Problem is, I can't get to their page right now- it has some good little scripts- so try back and maybe it will resurface.