Help on Custom Data Storage
View Single Post
05-16-2009, 06:39 AM
Join Date: Mar 2009
Ok, that's awful lots of replies at a time. I will answer the question 1 by 1:
I'm already using serialize/unserialize, but the down side I see is that variables updated in a session gets overwritten by another session later on. Understand what I mean?
I'm actually testing this er "method" or idea before implementing into an application. That application's requirements needs to stay basic which means the user only needs a web server and PHP to make it work. Therefore I'm trying my best to avoid using database.
Well, I really need a format that stores 1 row of array at 1 line, so that whenever I need to update them, I just update that particular line without touching the rest, unless PHP is unable to handle them...
Look at my answer to Salathe.
I'm only storing a few things, because it's about a script to download some files to the server, so it only needs to store the filename, the id, the download speed, currently downloaded file size and the total file size. I hope I'm clear enough for you guys to answer...
Seems like a lot of people recommend XML, I'll have a look at it first.
If it's still unclear to some of you what I actually want, here's a list of it
1. I only need to store a few strings and few numbers, but in rows, which means I will be retrieving it in 2 dimension arrays.
2. It's best if I can only update 1 line of the file and not touch the others.
3. The datas will be deleted after a period of time so the file will basically not grow too large, but the fact is that it will get updated very often (almost 1 time per 1.5s per user) which means I really need a way where I can update it without affecting other values.
Really long post but hopefully I'm clear enough.
View Public Profile
Send a private message to TheOnly92
Find More Posts by TheOnly92