Remove custom fields from WordPress database using SQL

I found that over time I had a vast number of custom fields set throughout my posts and pages, put there by plugins which are no longer used. In order to remove these unwanted custom fields, you need to edit each post and click on the delete option for each field no longer required, then save the post.

Read the rest of this entry

Replace WordPress database content using SQL statements

I recently change my blog location from the root domain to a subdomain. Following the guide from WordPress everything went swimmingly, except one thing.

Read the rest of this entry

List Table/Column names in SQL database

Microsoft SQL Server 2000 provides a method for obtaining meta data using information schema views. Read the rest of this entry

Reducing the Risk of SQL Injection Attack

Databases can be compromised if they are open to SQL Injection Attack. Stripping invalid characters from form inputs will reduce this risk.

If you have a form on your site that interacts with a database (e.g. a username/password login form), you should secure the form by adding an additional stage between submission and the database look-up. One way to do this is to check for valid content. Read the rest of this entry

Using ADO and SQL with ASP

This article illustrates how you can easily connect to and manipulate SQL databases using ActiveX Data Objects (ADO) with Active Server Pages (ASP)
Read the rest of this entry