pb affichage de resultat

Events happening in the community are now at Drupal community events on www.drupal.org.
demonaz's picture

salut

je vien de debuter sur drupal et je suis entraint de crée mon premier module

et je block sur l affichage de mes resultats

voici ma methode qui recupere un title de mon form quand je submit j aimerai afficher le resultat de la requete sur le content page

merci pour votre aide

function module_test_block_contents_form_submit($form, &$form_state) {

$header = array('Node ID', 'Title', 'Type', 'Terms', 'Created', 'Published', 'Sticky', 'Promoted');
$rows = array();
$noyes = array('No', 'Yes');

$results = db_query('SELECT * FROM {node} WHERE title LIKE "%s%%"', $form_state['values']['title']);

while ($node = db_fetch_object($results)) {
$termlist = taxonomy_node_get_terms($node->nid);
$terms = array();
foreach ($termlist as $key => $value) { $terms[] = $value->name; }
$rows[] = array($node->nid,
l($node->title, 'node/'. $node->nid .'/edit'),
$node->type,
implode(' | ', $terms),
format_date($node->created),
$noyes[$node->status],
$noyes[$node->sticky],
$noyes[$node->promote],
);
}
return theme('table', $header, $rows);

/**************************************************/
}

AttachmentSize
module_test.module.txt3.89 KB
module_test.info_.txt278 bytes

Comments

can you change in english?

tracybrown123's picture

hi
can you please describe me in english then may be i able to help you

tracy
bumper sticker printing

hi, i want to create my first

demonaz's picture

hi,
i want to create my first simple module which have an input text and return a result from an sql query in a page

mehdi

Tunisia

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: