Skip to content

Instantly share code, notes, and snippets.

@nucklearproject
Last active March 15, 2017 00:51
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 nucklearproject/5245967 to your computer and use it in GitHub Desktop.
Save nucklearproject/5245967 to your computer and use it in GitHub Desktop.
Drupal simple query's
REcopilacion de consultas SQL para drupal.
<?php
// Retorna un simple valor, retorna el nomnbre de la taxonomia
function termName($tid){
$name = db_query("select name from {taxonomy_term_data} where tid=:tid",
array(':tid' => $tid))->fetchField();
return $name;
}
// http://api.drupal.org/api/drupal/includes!database!database.inc/group/database/7
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment