If you need to order results from a MySQL query by a specific field value first then there’s a couple of approaches you can use. Let’s use as an example a table of countries where we want to order alphabetically but put the United Kingdom first.
This is the website of Andy Carter a PHP and jQuery web developer in the Steel City. Working with CakePHP (and a bit of Textpattern and Drupal too).
PHP traits provide a convenient means of sharing methods between classes. There are times though that we may need to override or extend a method defined in a trait attached to a class. Let’s take a look at how we can achieve this.
Using CDNs is great for improving site performance and lowering bandwidth usage on your server. However, they can also open up a security hole in your site. Troy Hunt has written a great piece about how you can protect your embedded content with subresource integrity.
The SRI Hash Generator website is a great resource for getting started with using subresource integrity (SRI).
I’ve written a piece on my Test Payment Cards cheat sheet for Smashing Magazine explaining the motivations behind it. You can read Testing Credit-Card Numbers In E-Commerce Checkouts over on the Smashing Magazine website now.
I’ve just released a new beta version of arc_meta for Textpattern 4.6.
As with the previous beta release, this one has a minimum requirement of Textpattern 4.6 which is also still in beta release; so neither of them are recommended for use on a live production site. However, if you use arc_meta and are testing the new version of Textpattern please check out this new release.
Package managers like Composer for PHP and NPM for Node have become essential tools for simplifying a developer’s life. A package manager is a tool for keeping track of what you’ve installed, as well as installing and upgrading packages. They also check for dependencies and compatibility. Bower is a package manager for the web.
A beginners guide to the task runner Gulp. Taking a look at why you should use it and why it is possibly better than Grunt.
- RT @PhpNut: We have officially released Oven for #CakePHP You can get it here. github.com/CakeDC/oven Please let us know how you like it.… 16 January 2017
- Oven for CakePHP looks very interesting, one-click install of a new CakePHP app from @CakeDC youtube.com/watch?v=HL1nuO… #cakephp #oven #php 16 January 2017
- This is kind of interesting, I see a lot of usage stats about web browsers but not for email clients emailclientmarketshare.com #webdev #email 10 January 2017
- RT @valross2: This may be the best app I've ever built pic.twitter.com/Z9WJi7e74G 13 December 2016
- The trams are running ridiculously late this morning. I've been waiting ages for one. 🙁 8 December 2016