my little sandbox
Great script, works great
I know the whole point was to make it easy with text files.
but what if I have 500 pages I want to count?
Yes, I know, I need 500 text files
how can I connect the script to a MYSQL database so I can forgo
making 500 txt files?
thanks
how can I connect the script to a MYSQL database
how can I connect the script to a MYSQL database
It's not stupid, it's advanced. I'm gonna roll around on the floor for a little bit, K. Hi floor, make me a sammish. Can I be a mongoose dog?
This would require quite some editing and is out of the scope of my support here. Try finding a script that already uses MySQL databases.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: how can I connect the script to a MYSQL database
I think you're mistaking graphic counter for click counter which only uses one clicks.txt file to store all links, whereas graphic counter requires a txt file for every different counter added.seeme101 wrote:my little sandbox
Great script, works great
I know the whole point was to make it easy with text files.
but what if I have 500 pages I want to count?
Yes, I know, I need 500 text files
how can I connect the script to a MYSQL database so I can forgo
making 500 txt files?
thanks
World's shortest poem: We, see.
You don't need 500 files, all the counting is stored in one txt file, however with 500 links being monitored, you might want to consider breaking up the hit counts by running two versions of the script as long as their folders are different with uniquely named clicks.txt files.Klemen wrote:This would require quite some editing and is out of the scope of my support here. Try finding a script that already uses MySQL databases.
World's shortest poem: We, see.
When a script stores its main data to one text file over time the one file gets to big to constantly rewrite correctly so it will crash somtime, and the data will get currupted. I have a buddy who perfected his flatfile db sysyem and its been tested for over 30,000 entries and runs very fast as it stors all data in sep data files, this works very well as each data file is only a few k big so the odds of it having a problem are very slim, plus if it did its one file not thousands of lines that can be damaged in a standard flatfile write.
So that is why we recomend using MYSQL if you are going to store masive amounts of data as that is the most reliable way to do it, as most flatfile scripts do write to one main txt file.
But on the other hand many times MYSQL is a pain and not needed if say your only working with a small amount of data then a text based flatfile system as Klem's site leads the way with is the way to go.
I have modified many of Klems scripts and they all work very well as long as they are used as he intended.
DC
So that is why we recomend using MYSQL if you are going to store masive amounts of data as that is the most reliable way to do it, as most flatfile scripts do write to one main txt file.
But on the other hand many times MYSQL is a pain and not needed if say your only working with a small amount of data then a text based flatfile system as Klem's site leads the way with is the way to go.
I have modified many of Klems scripts and they all work very well as long as they are used as he intended.
DC
To Code Or Not To Code That Is The Question?
Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...