The wp-config.php file in WordPress is one of the first files loaded each time a page is viewed. It contains database settings and encryption keys - in the wrong hands…
I use Microsoft Word's mail merge feature often. It works great for connecting into a database and spitting out all sorts of documents - but it's kind of clunky when…
The following T-SQL for Microsoft SQL Server shows how to convert line separated text to comma separated text. For example, if we had a table with the following data Lucky_Numbers 2 33…
The following T-SQL for Microsoft SQL Server shows how to find and replace text in a string. In this example we'll change "PO Box" to "P.O. Box". The REPLACE function will search for…
Problem When attempting to delete a database table row using SQL Management Studio you receive the following error message: No rows were deleted. A problem occurred attempting to delete row…
When you have a date or datetime column in an SQL database, it will output a value that looks like 2017-01-01 00:00:00.000 This is the standard format used for datetime columns…
The following T-SQL shows how to update a value using the results of a SELECT query. This applies to Microsoft SQL server (T-SQL) -- and will not work in MySQL.…
The following code can be used to disable the WordPress new user notification emails. There are two notification emails - the user notification - these are the emails the user…
In WordPress, the WPDB class is available for interacting with the database, for example reading or writing data. The PREPARE method is almost always used along with the WPDB. PREPARE…