|
 |
|
 |
10-22-2007, 05:47 AM
|
#1 (permalink)
|
|
Code Monkey
Join Date: Mar 2006
Location: Woodbury, CT
Posts: 38
|
Structured records without SQL?
WOW! It's been a long time since I've posted here!
OK, here's the question:
I currently build a log of site usage, with timestamp, page, and user-ip. Right now, it's delimited by <br>, so that another page can read the log, and display it on the screen without a lot of fancy coding (yeah, I'm lazy).
I've gotten to the point where I want to do some selective filtering on the
file, however, my hosting company charges a lot extra for SQL access, not something desirable for what is basically a hobby.
Having worked a lot with other languages/systems, it had been possible to create simple files with a set record length (at least, that's the way it looked to the program). I looked through the PHP docs and didn't see a way to create a file (or even records) in this manner, other than through SQL.
Any ideas, suggestions, hints?
You guys have been helpful in the past. My coding skills have severely deteriorated, and the technology has really zoomed past. It's true - if you don't use it, you lose it!
Regards.
Frank
|
|
|
10-22-2007, 06:39 AM
|
#2 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
|
It can be done with any type of file, that beeing a flat text file or a database structured file.
All you need to do, is put alot more work into your PHP part, when dealing with flat text files, than you need to do, when relying on SQL to handle all the sorting.
|
|
|
10-22-2007, 06:44 AM
|
#3 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 661
|
Or maybe use SQLite (if installed)?
It is not a full blown SQL server but just an easy file reader 
__________________

UT: Ultra-kill... God like!
|
|
|
10-22-2007, 07:01 AM
|
#4 (permalink)
|
|
Code Monkey
Join Date: Mar 2006
Location: Woodbury, CT
Posts: 38
|
Thanks for the replies!
I think I'm going to end up putting the work into the reader, probably in JAVA than to go back and change the code in the site. It sucks that SQL happens to be a paid extra, rather than a built-in, but, as stated before, it's a hobby and not an income-producing site, and for the amount of storage and bandwidth, they're a good deal (<$7/mo).
I can probably code a decent reader with the features I want in a short amount of time - sort by IP, sort/count by page accessed, and filter out IP addresses (Googlebot and Searchlive are a good number of hits on the site).
Yeah, SQL would have been my preferred way to do it, but I got to rely on my old school skills and find a way around it (I was writing programs like this, including the sorts, way before SQL existed!!).
Thanks all - glad to see you're all still around!
Frank
|
|
|
10-22-2007, 10:16 AM
|
#5 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,475
|
hey frank,long time!
there's plenty of hosts out there who offer mysql with php for under $7/mo. shop around. any decent host doesn't charge extra for mysql access.
__________________
Mike
|
|
|
10-22-2007, 02:09 PM
|
#6 (permalink)
|
|
Java fanboy
Join Date: Aug 2003
Posts: 1,151
|
If I might make a selfish plug, I use DreamHost and they've been decent as an ultra-cheap hoster. Decent web-based tools, large quotas, decent support, and, yes, MySQL. They cost between $6 and $11, depending on how far in advanced you pay, and they have a deal going where you can get $110 off any year-long purchase (so a one-year purchase is more-or-less free). The code is on their front page.
And if you sign up through here, I get a kickback 
|
|
|
10-22-2007, 04:14 PM
|
#7 (permalink)
|
|
Code Monkey
Join Date: Mar 2006
Location: Woodbury, CT
Posts: 38
|
Thanks all!
In spite of the limitations, I think I'm going to stick with my current host, seeing as I have 4 sites there, and for my measly monthly fee, they host them on 2 different accounts - saving me a substantial amount of money in the long run (literally, half price per account - plus, they pay for the domain names!) The site on my profile is the only one that does any fancy PHP (or needs to), and I can't see switching that one for something I can do on the back end easily - it would be cheaper for me to buy SQL support rather than switch to another host. My decision to go with this host was support when I first started building sites (back around 1998), and the unlimited bandwidth
Good to see all you guys (and gals, Redhead!) again. I'm in the middle of my busy season, so I get one or two days a month to play with the site, mostly writing my next newsletter. I'll have more time to play around with coding after Xmas, when we're deader than a church on a Tuesday afternoon. I may revisit this issue then.
As an afterthought, anyone got a good sitemap builder for searchbot (another problem I'm facing)?
Frank
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
SQL Pre-pre-Basics
|
QUantumAnenome |
Everything SQL ( MySQL, MSSQL, DB2, Postgre, Oracle, etc...) |
3 |
06-20-2006 07:20 PM |
|
help with SQL and VB.NET
|
doobiwan |
Everything SQL ( MySQL, MSSQL, DB2, Postgre, Oracle, etc...) |
4 |
06-10-2005 07:09 AM |
|
sql server 2000 validation problems
|
cmartin2 |
MS Technologies ( ASP, VB, C#, .NET ) |
0 |
12-11-2004 11:55 AM |
All times are GMT -8. The time now is 07:31 PM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|