(First time PHP programmer)
I have used MySQL before, but whenever there are some server problems, any access to the data causes the page to have upwards to 6 seconds before it starts to load. When I took out the line that accessed the database, the page loaded instantly.
I don't really require a very big database, just enough to hold, at maximum, probably a couple paragraph's worth of data. I mainly just want to record daily visitor and traffic out stats in one file, then archive that into a larger file that holds 30 days worth of such data.
Should I just use a text file for this? Any other alternatives?
How do I go about making a secure database file that cannot be accessed by anyone but me?
Database alternative
Moderator: General Moderators
-
jaymoore_299
- Forum Contributor
- Posts: 128
- Joined: Wed May 11, 2005 6:40 pm
- Contact:
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
-
jaymoore_299
- Forum Contributor
- Posts: 128
- Joined: Wed May 11, 2005 6:40 pm
- Contact:
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
You can achieve some pretty rough and ready results by just using delimitted text files and a small amount a regex (or a large amount of explode() etc). I used to do this in the days before I actually bothered to learn MySQL 
Providing you're comfortable with the filesystem functions fopen() fread(), fwrite() etc and you carefully consider an appropriate delimter to use then for small amounts of data you should be ok.
I actually ran a website with over 3000 ringtones using a system like this as a noob (oh dear
).
Code: Select all
#somesection
field1 ::@:: field2 ::@:: field3
field1 ::@:: field2 ::@:: field3
field1 ::@:: field2 ::@:: field3
field1 ::@:: field2 ::@:: field3
#end_somesection
#anothersection
field1 ::@:: field2
field1 ::@:: field2
#end_anothersectionI actually ran a website with over 3000 ringtones using a system like this as a noob (oh dear
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm