PHPMailer : Language string failed to load: instantiate

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. 

Continue Reading »

Popularity: 10% [?]

2 Comments Posted in PHP, web development
Selecting / joining two tables in MySQL – explained

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 »

Popularity: 6% [?]

No Comments Posted in MySQL
Generate a heatmap of your site

I stumbled over a couple of very interesting sites today. Have you ever heard of Jacob Nielsen and heatmaps? Sure you have, how would you ever find this post unless you searched for “heatmap”,  right? (I also wrote about heatmaps last year).

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.

Continue Reading »

Popularity: 6% [?]

No Comments Posted in web development
Creating a boxplot in Excel 2007 with negative values in dataset

Keywords: Excel, boxplot, box plot, stem and leaf plot, box and whiskers plot, negative values

Dowload:

Since my previous articles on boxplots in Excel, Improved advanced box-plot and whiskers chart in Excel and Box plot for Excel 2007, I have recieved a lot of questions on how to do boxplotswith negative values using Excel, since it would break the original method that I suggested.

There is a way, and I will guide you through it step by step. Let’s say you have the following data:

Continue Reading »

Popularity: 10% [?]

5 Comments Posted in Excel
Select a random row (like user or post) from your MySQL table

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.

Popularity: 10% [?]

No Comments Posted in MySQL