Sequel Pro

Use Regular Expressions to Search and Replace in Coda or TextMate

Added on 4th November 2010

As in the original post, I'd generated a list of node ID values, and needed to add structure the SQL update statment formatted in a certain way. However, I changed my inital query slightly to out put the same nid value twice.

 

{syntaxhighlighter brush: sql;fontsize: 100; first-line: 1; }SELECT nid, nid FROM node WHERE TYPE = 'blog' ORDER BY nid ASC;{/syntaxhighlighter}

Create a Better Photo Gallery in Drupal - Part 2

Added on 17th August 2010

At the end of my last post, I'd finished creating the first part of the new photo gallery, but I wanted to change the dates of the published photos to reflect the ones on the client's original website.  

Firstly, I'll refer to the previous list of published galleries that I created before, and create something different that also displays the created and modified dates. Picking the node ID of the required gallery, I used the following SQL query to display a list of photos.

 

Change the Content Type of Multiple Nodes Using SQL

Added on 1st July 2010

In this Blog post, I will be changing values within my Drupal 6 site's database to quickly change the content type of multiple nodes. I will be using a test development site with the core Blog module installed, and converting Blog posts to a custom content type called 'News article'.

Before changing any values within the database, ensure that you have an up-to-date backup which you can restore if you encounter a problem!

To begin with, I created the 'News article' content type, and then used the Devel Generate module to generate some Blog nodes.

Subscribe to RSS - Sequel Pro