A gotcha with PHP’s PDO::FETCH_CLASS
PHP’s PDO has a nifty way of fetching database records into an object, but there’s a slight gotcha when also using a constructor which initializes the class properties.
PHP’s PDO has a nifty way of fetching database records into an object, but there’s a slight gotcha when also using a constructor which initializes the class properties.
If you’ve got a filename that you need to remove the extension from with PHP, there are a number of ways to do it. Here’s three ways, with some benchmarking.
Occasionally I’ve needed to specifically make the mouse a hand with HTML and CSS when mousing over a particular area and I’m always forgetting the property used to set it, so this quick post is for my own quick reference, and shows example of the other property values too. cursor: pointer To make the mouse …
There may be times you need to apply a style if an element is empty, or if it is not empty. Use the :not & :empty selectors to do this, as shown in this post. They are supported by all modern browsers, and Internet Explorer from 9 and up.
A few days ago, I posted how to temporarily change the auto increment increment in MySQL. This post has an extension class to PHP's PDO to get the current auto increment value, change it to a new value and then reset it back to the original.
Feedly Mini shows a Feedly icon bottom right of all web pages in Google Chrome when the Feedly plugin is installed and enabled. This post shows how to disable the icon from appearing.