This problem were driving me nuts for a couple of hours so I decided to post it here, to the benefit of others. Using the PHPMailer class to send mail to members from one of our sites I were writing a new function, but all of a sudden my mailing function refused to cooperate, and would return the error:
Language string failed to load: instantiate
This mysterious error came out of the blue, since I’d been using the same function for a long time without any hassle. After going through every bit of the problem it boiled down to not having anything to do with any Language string, which one would believe, but the interesting part of the error message is instantiate.
Trying to create MySQL queries can be a daunting task for the beginner and before understanding the logic it can be really confusing. A common task is to select related data from two tables to generate for example a list of blog posts, where you might want to also display the number of comments for each post.
This is best done by using a JOIN query. How to construct the query will be explained here, step by step.
First of all, we will put the fields we want to get in the SELECT-statement, like this: Continue Reading »
Well, heatmaps can give you valuable information about your sites layout. Is it effective? Where does visitors look?
Such information can give you ideas on what kind of changes to make your site more effective and usable. But how does on go about an make a heatmap? Not all of us have some old eyetracking equipment lying about, nor do we have thousands of dollars to get someone else to do it for us, so basically we’re screwed.
I have beein using all kinds of strange constructs to be able to select a random row (often user or post) from table, and then I stubled over this on sitepoint forums:
SELECT * FROM users WHERE age > 20 ORDER BY RAND() LIMIT1
One simple argument to the query! Awsome. Hope it helps you as much as it helped me.