27th November
Yay! Learned a bit more, managed to check user login on the 'AJAX side'. I'll still send uid from page with every request, so both can be compared. Who knows, someone might mess with cookies or logging in/out.
So... now I can totally forget that Mysqli side-adventure and carry on writing everything with PDO. Classes work exactly the same, just have to change a couple of lines and have parallel copies of each one, for AJAX and non. Rather inefficient, but the normal classes still refuse to work here.
... hmm what's this, error about maximum connections? Been doing something wrong, making too many I guess.
"PDO does not necessarily just reuse the first connection made when called repeatedly, which was the case with mysql_connect. In certain situations, if you create multiple PDO instances with the same connection details, it may create multiple connections."
Added closing function, but how to forcibly close all those already open? :/ Bah. Gonna have to wait til tomorrow and hope they've closed by then!
Also had idea to make an advent calendar. Should be pretty simple. Except it can't be tested tonight because of the DB thing.
28th November
Well crap. The error is still happening (when the heck ARE they gonna time out?) and I searched all around phpMyAdmin and the host files, but can't find any way to count how many connections there are, or stop them. So can't do any more tweaking/testing of that.
At least the mysqli scripts still work though. Guess I'll have to keep using that for more AJAX features... and just have to rewrite later...
Right, enough headaches, I simply can't figure out where to move this template function. Let's chill out and just make this bliddy calendar. *hmph*
29th November
Calendar made. Satisfied! Also apparently Ittermat was looking for someone to code her one anyway, so that's convenient lol.
What shall I work on now? Hmm...
- random events system needs redoing/updating. Instead of happening on some pages, add it to template class.
- flock check shouldn't fetch griffs/groups on page load, instead only look them up if user clicks the icon.
- think of how to remake the notifications system. Using text like "Griffname laid an egg nicknamed Scruffy, sired by Daddyname" is really inefficient.
Should use numbers instead, like... if message type is 3 (breeding) then there are 3 columns for mother, father and baby IDs, and from the message type we get the sentence "X laid egg Y, sired by Z" in which to place those vars.
- ITEM FUNCTIONS NNGGGHHH. All these things sitting around and still nothing to do with them.
- also was wondering about inventory, how to lay out so many types of items. Hmm. Maybe scrap the tabs and put a search there, like for flock. You can choose the category (if any) there, plus search by name and quantity.
Related to inventory, I might add another 'type' column, to really narrow down what each item is. 'Ore' can then show up in both Mineral and Raw Materials groups.
Or maybe I can scrap categories entirely, and just have those specific groups.
Went on a detour and added 6 mutations for critters! Albinism, melanism, leucism, xanthism, erythrism, cyanism.
Tested creating, searching and breeding them, seems to work. Simpler genes than griffs, the mutation is passed down straight from mother or father.
Pagination doesn't seem to be working *sigh* but will fix that tomorrow.
30th November
Inventory. 44 item types. WHAT AM I DOING
Also here's a tiny preview of a new base. Still shoddy, needs cleaning up and highlights. Just getting used to the style.
But I hope it's not too atrocious.
Yay! Learned a bit more, managed to check user login on the 'AJAX side'. I'll still send uid from page with every request, so both can be compared. Who knows, someone might mess with cookies or logging in/out.
So... now I can totally forget that Mysqli side-adventure and carry on writing everything with PDO. Classes work exactly the same, just have to change a couple of lines and have parallel copies of each one, for AJAX and non. Rather inefficient, but the normal classes still refuse to work here.
... hmm what's this, error about maximum connections? Been doing something wrong, making too many I guess.
"PDO does not necessarily just reuse the first connection made when called repeatedly, which was the case with mysql_connect. In certain situations, if you create multiple PDO instances with the same connection details, it may create multiple connections."
Added closing function, but how to forcibly close all those already open? :/ Bah. Gonna have to wait til tomorrow and hope they've closed by then!
Also had idea to make an advent calendar. Should be pretty simple. Except it can't be tested tonight because of the DB thing.
28th November
Well crap. The error is still happening (when the heck ARE they gonna time out?) and I searched all around phpMyAdmin and the host files, but can't find any way to count how many connections there are, or stop them. So can't do any more tweaking/testing of that.
At least the mysqli scripts still work though. Guess I'll have to keep using that for more AJAX features... and just have to rewrite later...
Right, enough headaches, I simply can't figure out where to move this template function. Let's chill out and just make this bliddy calendar. *hmph*
29th November
Calendar made. Satisfied! Also apparently Ittermat was looking for someone to code her one anyway, so that's convenient lol.
What shall I work on now? Hmm...
- random events system needs redoing/updating. Instead of happening on some pages, add it to template class.
- flock check shouldn't fetch griffs/groups on page load, instead only look them up if user clicks the icon.
- think of how to remake the notifications system. Using text like "Griffname laid an egg nicknamed Scruffy, sired by Daddyname" is really inefficient.
Should use numbers instead, like... if message type is 3 (breeding) then there are 3 columns for mother, father and baby IDs, and from the message type we get the sentence "X laid egg Y, sired by Z" in which to place those vars.
- ITEM FUNCTIONS NNGGGHHH. All these things sitting around and still nothing to do with them.
- also was wondering about inventory, how to lay out so many types of items. Hmm. Maybe scrap the tabs and put a search there, like for flock. You can choose the category (if any) there, plus search by name and quantity.
Related to inventory, I might add another 'type' column, to really narrow down what each item is. 'Ore' can then show up in both Mineral and Raw Materials groups.
Or maybe I can scrap categories entirely, and just have those specific groups.
Went on a detour and added 6 mutations for critters! Albinism, melanism, leucism, xanthism, erythrism, cyanism.
Tested creating, searching and breeding them, seems to work. Simpler genes than griffs, the mutation is passed down straight from mother or father.
Pagination doesn't seem to be working *sigh* but will fix that tomorrow.
30th November
Inventory. 44 item types. WHAT AM I DOING
Also here's a tiny preview of a new base. Still shoddy, needs cleaning up and highlights. Just getting used to the style.
But I hope it's not too atrocious.



