Yes, I'm aware of the php tags however I was quite sleepy at the time of the last posting.
At any rate -
I've converted the text file from being output as it was (the loop) to now being inserted into a database every 30 minutes so I can sort things how I wish.
However, this presents an entirely different problem, not necessarily major in comparison mind you, but it is slowing down the load time of the page per update.
While things are now working beautifully in the "I work." sense, I'm now curious if I can drop the number of queries this is adding per update (plus there's a query checking to see even if it can update).
--
There're 4 added queries in order to do this method -
1 query is added always, as it checks the time past.
If the time has past for an update, 3 queries are added: delete, load data infile, and to update the time.
Here's a quickie example of what's taking place:
PHP Code:
$stamp = $DB_site->query_first("SELECT * FROM time");
if ($stamp['timestamp'] < time() - 1800) {
$query_delete = $DB_site->query("DELETE FROM rooms");
$query_roomload = $DB_site->query("LOAD DATA INFILE '..filepath variable..' INTO TABLE rooms (a,b,c,d,e,f,g)");
$query_stamp = $DB_site->query("UPDATE time SET timestamp=" . time() . "");
}
Is there any way possible for me to drop these queries or change this logic around to be a bit more.. clean? Or is this as clean as it gets?
Thanks guys.