pb affichage de resultat

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by demonaz on July 22, 2009 at 1:05pm

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.txt 3.89 KB
module_test.info_.txt 278 bytes

Comments

can you change in english?

Posted by tracybrown123 on December 24, 2009 at 12:58am

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

Posted by demonaz on December 24, 2009 at 9:36am

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:

AltStyle によって変換されたページ (->オリジナル) /