Skip to content

Instantly share code, notes, and snippets.

@adam
Created October 29, 2010 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam/654373 to your computer and use it in GitHub Desktop.
Save adam/654373 to your computer and use it in GitHub Desktop.
my $sql = "SELECT slug FROM $content_type WHERE slug = '$requested_slug'";
# if we have a uuid, we are peforming an UPDATE, so exclude the existing row from the search
if (defined($uuid)) {
elog(NOTICE, "Performing an update, so adding WHERE uuid <> '$uuid'");
$sql .= " WHERE uuid <> '$uuid'";
}
elog(NOTICE, $sql);
my $results = spi_exec_query($sql);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment