News and Blog > MySQL

WooCommerce attributes
3 months ago - Posted by Steve Marks to (X)HTML / CSS, MySQL, PHP, Web Development.
I’ve been working on an e-commerce WordPress website that uses the WooCommerce plugin to power the shop and checkout process. The plugin has made the setup of the shop very simple and handles the majority of the tasks associated with an online store. One thing that I did struggle wit...
4 months ago - Posted by Steve Marks to MySQL, Web Development.
Before I begin it’s worth nothing that this error is only a problem on certain versions of MySQL. The error in question is as follows: [Err] 1305 - FUNCTION databasename.CONCAT does not exist Let’s take a look at a very simple query that would result in this error appearing: SE...
4 months ago - Posted by Steve Marks to MySQL, Web Development.
Let us begin by taking the following MySQL table: CREATE TABLE `my_table` ( `my_value` VARCHAR( 255 ) NOT NULL ); And now let’s insert the following values: INSERT INTO `my_table` (`my_value`) VALUES ('1'), ('2'), ('5'), ('5A'), ('10'), ('30'); So we’ve got a simple table with ...
4 months ago - Posted by Steve Marks to (X)HTML / CSS, Javascript / jQuery, MySQL, PHP, SEO, Web Development.
This week has seen the launch of a new website of mine, Gifts To Thrill. The site offers experiences such as driving supercars and helicopter lessons, as well as traditional and personalised gifts. Behind the scenes the website acts as affiliate site, meaning that when someone clicks throu...
5 months ago - Posted by Steve Marks to MySQL, PHP, Software, Web Development.
The problem I’m about to explain had me stumped, good and proper. There I am, working away happily on a basic PHP MVC framework, when BHAM! Life comes to a standstill and I spend the next hour or so trying to debug why I’m getting a ‘Content Encoding Error’ appear i...
6 months ago - Posted by Steve Marks to (X)HTML / CSS, Javascript / jQuery, MySQL, PHP, SEO, Web Development.
For regular readers of this blog you might have guessed that I’m a huge fan of maps, and working inparticular with the Google Maps API. I also find that the best way to learn anything in the coding world is to use it in a real life scenario. As a result, and to hopefully produce [......
6 months ago - Posted by Steve Marks to MySQL, Web Development.
When recently working on an application that contained a map, I wanted to get all items from a MySQL database between two latitude/longitude coordinates. As a result my initial queries looked similar to the below: SELECT `fieldNames` FROM `my_table` WHERE `latitude` BETWEEN 42.689506 AND 4...
8 months ago - Posted by Steve Marks to MySQL, Web Development.
When performing a GROUP_CONCAT() in a MySQL query you might notice that the results come back in no particular order, or to be precise, in the same order as if you ran the query without the GROUP_CONCAT(). Let’s take the following SQL to create our test scenario: CREATE TABLE `animal...
10 months ago - Posted by Steve Marks to MySQL, Web Development.
If you’ve found this post you’re probably trying to find out why your MySQL query is returning the following error: Subquery returns more than 1 row To allow me to explain the problem let me show you an example of a query that might throw this kind of error: SELECT `col1` FROM ...
10 months ago - Posted by Steve Marks to MySQL, Web Development.
I remember when I started coding and writing SQL, one of the very first things I had to look up was how to order an SQL resultset by multiple columns. Let me dive right in and provide some examples… Ordering by a single column SELECT `col1` FROM `tablename` ORDER BY `col1` Ordering b...