Skip to content

Instantly share code, notes, and snippets.

@deadprogram
Created October 20, 2008 22:40
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 deadprogram/18205 to your computer and use it in GitHub Desktop.
Save deadprogram/18205 to your computer and use it in GitHub Desktop.
sql << (" AND (list_entries.site = '" + domain + "'")
sql << (" OR list_entries.site = '" + subdomain + "'" )
current_subdir = subdomain.chomp("/")
subdirs.split("/").each do |dir|
current_subdir = current_subdir + "/" + dir
sql << " OR list_entries.site = '" + current_subdir + "'"
end
sql << ")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment