Before Deleting a Database Table, Change Its Name

When a MySQL table is no longer needed, it could be deleted. However, are you sure that the necessary changes have been made so that the website is no longer connected to the table? It's tough to know for sure when the old database table is still available for querying. If the table is removed and it's still being used, it takes time to fix the connection(s). The database table could be restored until everything is fixed, but that's going to take time also. Instead, let's consider renaming the table before permanently deleting it. [Continue reading]

Remove Test Code Quickly with a Simple Dreamweaver Search

Adding test code throughout your scripts may be necessary for troubleshooting or adding new features, but how do you go about removing the code? In a previous post, a few techniques for locating the blocks of test code were discussed, but the code still needs to manually removed. Instead, let's tap into Dreamweaver's search for HTML tag feature. [Continue reading]

Minimizing MySQL Queries with the implode() Function

After seeing the many warnings that MySQL queries shouldn't be executed within loops, I finally broke down and figured out an alternate solution for the majority of queries where I use loops. Most times, a loop feels necessary when one database table contains the core information and another has multiple entries of supporting information. Instead of going for the typically loop, let's look at using the implode() function. [Continue reading]

Building the Where Clause for MySQL Dynamically

There are a number of ways to dynamically build the WHERE clause for a MySQL query. You could, for example, run several if() statements in the middle of a query. Or one could tap into the power of the implode() function. [Continue reading]

Going Live with Incomplete Code; Is It Okay?

Even though it isn't required, should code be left incomplete? For example, the last property/value pair in a CSS declaration doesn't need a semi-colon. The code validates and functions normally. So why worry about that last character? [Continue reading]

Attaching Helper Files to Outlook Notifications

Some tasks are easier to accomplish when additional resources are readily available. When creating quarterly reports, the previous report would make a handy template. For events held annually, samples from last year's social media campaign could be included. Basically, if files are needed, they can be attached to the corresponding calendar entry in Microsoft Outlook. Then we don't need to hunt down a bunch of files when under pressure to complete the task. [Continue reading]

Keep Up with Deadlines by Using Microsoft Outlook’s Notifications Feature

When maintaining websites, there are bound to be tasks which need babysitting. Online registration forms, for example, need to be disabled after the registration deadline. If the person responsible for removing the form gets busy, they may forget all about the form. Instead, let's look at utilizing Microsoft Outlook to send notifications about tasks.

[Continue reading]

Proofreading Your Code Comments before Posting Them Online

You already spell check the text on your website(s)…right? Well, what about those code comments? Although few people are likely to ever see the comments, it's worth keeping this topic in mind in case you ever decide to publicize your code. Or if you share code samples with potential employers.

[Continue reading]

Sorting Complicated Lists with PHP When A Database Isn’t Necessary

Websites commonly have content that's sorted in some fashion. For larger projects, utilizing a database may be optimal. But what about those smaller projects? When displaying a short list of advisory board members, for example, I typically go straight to HTML and my grand knowledge of the ABCs. That may work in the short run, but eventually mistakes happen. We can minimize the risk by leveraging PHP for sorting complicated lists. [Continue reading]

Making It Easy to Locate and Remove Test Code

When troubleshooting, sometimes it's necessary to add code to test various features. The problem is that the code may accidentally be left in when going live. Removing the extra code as you go may work in most situations. Or maybe you just know where the test code is located and removing it doesn't seem like a problem. However, what happens if you're pulled away from the task by some other emergency or deadline? Over time, the test code you were so familiar with may not be as obvious. Instead of depending on memory, here are some options for making test code stand out. [Continue reading]