Expert Drupal and PHP Web Development

Steindom offers professional web development services for businesses of any size. To discuss your particular need, please contact us at 573-340-3276 or via email.

When troubleshooting queries built with Drupal 7's Database API (affectionately known as "DBTNG"), there often comes a time when I need to see the actual query that's going to be executed in the database. Here's a quick and handy tip to assist query troubleshooting. More »

When dealing with large databases, it's helpful to see some statistics about your tables. This is found in the "information_schema" database, under the "TABLES" table. Here's a helpful query to find the size of all your tables in a particular database (the data size, index size, and total size), and sort by the total size. More »

In PHP 5.3, anonymous functions (or "closures") were introduced. To those who know Javascript well, these will be familiar. They allow you to create a sort of one-off function, and they're all sorts of useful. More »

There are tons of code snippets out there to convert a CSV file to an associative array, where the first line contains the column headings for the rest of the file. Most of them were really long, but I came up with what I think is the shortest way to accomplish this in PHP. More »

Here's a helpful tip for situations where you need to add a prefix to all of your database tables. Supposing that your database was called "my_database" and the prefix you want to add is "my_prefix", execute the following query: More »

MAMP came out with a new 2.0 version, and so it's time to update the file (see my previous posts for MAMP 1.9.5 and MAMP 1.9.6). As before, you can either download the file, or compile it yourself. More »

Drupal's permission screen has loads of checkboxes. And if you've got lots of roles and you're using something like Forum Access, you'll find yourself clicking 'till the cows come home. Fortunately, there's an easy solution—CheckBoxer, a Google Chrome Extension. More »

Here's a little snippet to move a menu link from one menu to another. For example, let's move the Contact Us link from the Primary Links menu to the Secondary Links menu. All you really need to know is the internal name of the menu where you want it to move to. More »

I frequently export field definitions so I can programmatically create them in an update.php function. In Drupal 6, the CCK module came bundled with a Content Copy, but (so far) I have found no similar tool in Drupal 7. Here are the tricks I use to do this in a quick an relatively painless way. More »

I encountered a situation today where I needed to format a date which was far into the future (Anno Domini 2199). However, my standard approach of converting the string into a timestamp via strtotime and then formatting it with date produced weird results. In situations like this, it's best to create a date object. More »