Gossamer Forum
Home : Products : DBMan : Customization :

Record counter

Quote Reply
Record counter
Is it possible to make a counter that would count how many times a record has been displayed ?!?

It should be easy... like add field Counter and everytime the html_show_record is executed Counter will be Counter+1...
Carol ?!?

Tnx...
Quote Reply
Re: Record counter In reply to
Well, this is from Mart's html.pl script that I was helping him with. He is using the short/long display mod and has it in his html_record_long subroutine:

Mod removed because of problems.


------------------
JPD







[This message has been edited by JPDeni (edited May 24, 1999).]
Quote Reply
Re: Record counter In reply to
Tnx a lot... I'll try it later...

One more thing... as a tribute to your help I'll try to help you too, and to collect some of your mods you posted here, but doesn't seem to be on jpdeni.com...

Tnx again...
Quote Reply
Re: Record counter In reply to
Carol's (JPDeni) work is located at:
http://www.drizzle.com/~hall/

Quote Reply
Re: Record counter In reply to
This mod needs some work. I tried it and it seemed to work. However, it began adding records like crazy. It went from 14 records to over 200 records. Also, <B><B></B></B> were mysteriously placed in the database file.

WARNING: DO NOT USE THIS MOD UNTIL IT HAS BEEN REFINED. KEEP A BACK-UP OF YOUR DATABASE FILE BEFORE USING THIS MOD!!

I think that it has something to do with the flocking commands. But I am unsure. I went through the codes and the syntax seem to be fine. May be this works well on UNIX boxes, but it sure as heck does not work on NT.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited May 24, 1999).]

[This message has been edited by Eliot (edited May 24, 1999).]
Quote Reply
Re: Record counter In reply to
AFAIK, Carol's mods are at www.jpdeni.com .

But, there is one problem with record counter...

It works BUT...

if I search for keyword, and bold is ON, found field will be bolded and then written to dbase with <br>field</br>...

I know I can override this by turning bold OFF, but I need to use bold ON...

err... I have no problem with misteryous adding of fields but <br> is caused when you do a search...

[This message has been edited by Cacan (edited May 24, 1999).]
Quote Reply
Re: Record counter In reply to
This mod is VERY dangerous at the present moment. The database file has grown from 10K to 3 MGs in over two hours. I am afraid that I am going to have to deal with a crashed server when I walk into work tomorrow morning!! :-(

I would suggest removing this mod until the "kinks" have been worked out. In addition, I would put a HUGE disclaimer saying that it has not been tested.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Record counter In reply to
Sorry I've been out of touch most of the day. All the phones were down in Seattle today.

All of my current mods are at
http://www.jpdeni.com/dbman/mods.html

There are a number of them still at the drizzle site, but they are outdated. Don't use the old ones. Use the ones at the address above. The old ones will be leaving very soon.

As I said, the mod I posted here in this thread came from a script of Mart's. I looked it over a little bit, but not carefully. This mod is not mine.

There's a good chance that it won't work without flock. I don't know.

The bold tags come from the search. I'd have to work a bit to figure out how to get rid of them. When I have time...

I will remove the mod from my post as soon as I add this message. I'll see what I can do later to come up with something you can use.


------------------
JPD





Quote Reply
Re: Record counter In reply to
Thank you. I do have flocking enabled and it still copied records over and over again, and added bold and break line tags. While our server did not crash, the database file did grow from 3 MGS before I went to bed last night to over 70 MGS by this morning.



------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Record counter In reply to
Eliot,

There's some loop in the subroutine that hasn't stopped for some reason. There's no point in leaving it running, or it *will* crash your server, so just ask your sysmadmin to shut down any Perl processes relating to db.cgi.

adam
Quote Reply
Re: Record counter In reply to
Or if you don't want to contact your sysadmin, delete all your dbMan files, or whichever one have mods made to them. You can always reinstall them later when we have the subroutine figured out.

Cheers,
adam
Quote Reply
Re: Record counter In reply to
I am the system administrator (along with being manager of various groupware, webmaster, web technology coordinator, web programmer, web designer, etc.). I deleted the database file and restored it. I also restored older versions of the html.pl file.

Thanks for the suggestion though. It was pretty dumb of me to just let the scripts go in a production environment. I should have left it in the test environment. But I thought the script was functioning fine until I got home and realized that the script and database files were corrupted. (The problem is that I do not have remote access to our web server, which I hope to rectify in the coming months.)

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited May 25, 1999).]
Quote Reply
Re: Record counter In reply to
My deepest apologies for posting the code before I looked at it carefully. I assumed that it had been tested by someone else.

My suggestion is that you get that mod out of your script NOW!!! It's going to take some rebuilding to get your database back together again and I'm really sorry for that.



------------------
JPD