Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function testing_db_viewall($form, &$form_state){
- $result = db_select('infobox_new')
- ->fields('infobox_new', array('name','emailid','contactno','nid'))
- ->execute();
- $entries = $result;
- $output ='';
- $rows = array();
- foreach ($entries as $entry) {
- // print_r($entry);
- // echo "<br>";
- $rows[] = array( $entry->name, $entry->emailid, $entry->contactno, l('edit','examples/edit/'.$entry->nid), );
- }
- // Make a table for them.
- $header = array(t('Name'),t('Email id'), t('Contact No'),t('edit'));
- $output .= theme('table', array('header' => $header, 'rows' => $rows));
- echo $output;
- }
Add Comment
Please, Sign In to add comment