Last active
March 15, 2017 00:51
-
-
Save nucklearproject/5245967 to your computer and use it in GitHub Desktop.
Drupal simple query's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Buena info :
http://api.drupal.org/api/drupal/includes!database!database.inc/function/db_query/7
Static Querys
http://drupal.org/node/310072